tx · 2fmMxLi6Bisiogo7S27NamqZcrHnWBrGJuS6V43LffaF 3N6fTzqTSR5TgnERgXCu6QdBXko9hCefzP5: -0.01300000 Waves 2023.03.23 16:50 [2502731] smart account 3N6fTzqTSR5TgnERgXCu6QdBXko9hCefzP5 > SELF 0.00000000 Waves
{ "type": 13, "id": "2fmMxLi6Bisiogo7S27NamqZcrHnWBrGJuS6V43LffaF", "fee": 1300000, "feeAssetId": null, "timestamp": 1679579456269, "version": 2, "chainId": 84, "sender": "3N6fTzqTSR5TgnERgXCu6QdBXko9hCefzP5", "senderPublicKey": "HgH8MfpuURJBWAr8E3KbVp9C2NYiXi3H4WnsJJq5xVqG", "proofs": [ "3NtwjawKvbrYNojRzrxVx7zK9LLiBftXFcg21qeyaKPCu1oyzY6aXfr8iE2ved3HJJd8tenhRzcSjUXEDtty7duR" ], "script": "base64:BgJHCAISBAoCCAgSBAoCCAESAwoBCBIGCgQICAgIEgUKAwgICBIDCgECEgQKAggBEgMKAQgSBgoECAEBARIECgIBARIDCgEBEgAcAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTgpAQIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTgpAQIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAgt0b3RhbEFtb3VudAAHYmFzZVVSSQkBEUBleHRyTmF0aXZlKDEwNTgpAQIHYmFzZVVSSQAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwAMdG9rZW5QYXltZW50CQERQGV4dHJOYXRpdmUoMTA1NykBAgx0b2tlblBheW1lbnQAEXRva2VuUGF5bWVudEFzc2V0CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAOwHAQkBEU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QIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIJAQUkZjFfMQIFBSRhY2MwAAAAAQACAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdAB4AHwAgACEAIgAjACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA7ADwAPQA+AD8AQABBAEIAQwBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQAFEAUgBTAFQAVQBWAFcAWABZAFoAWwBcAF0AXgBfAGAAYQBiAGMAZAUDbmlsABLU8rs=", "height": 2502731, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HRSxMw8vt2cDtMxzGmUMXbWZ1dpCniR4Gj1ex8bqXVpG Next: 4cN7zb9WWbBCCvz6Tf8ok4HqX3vBJHotrBN1bT4rNoY1 Diff:
Old | New | Differences | |
---|---|---|---|
83 | 83 | let L = I._3 | |
84 | 84 | let r = I._4 | |
85 | 85 | if ((L > K)) | |
86 | - | then $ | |
86 | + | then $Tuple4((J :+ DeleteEntry(((("lend-rent-" + r) + "-") + toString(K)))), (K + 1), L, r) | |
87 | 87 | else G | |
88 | 88 | } | |
89 | 89 | ||
97 | 97 | func O (G,H) = ((G + "-") + H) | |
98 | 98 | ||
99 | 99 | ||
100 | - | func P (E,m) = if ((assetBalance(E, fromBase58String(m)) == 1)) | |
100 | + | func P (G,H) = { | |
101 | + | let Q = G | |
102 | + | let J = Q._1 | |
103 | + | let K = Q._2 | |
104 | + | let L = Q._3 | |
105 | + | let r = Q._4 | |
106 | + | if ((L > K)) | |
107 | + | then $Tuple4((J :+ ((("lend-rent-" + r) + "-") + toString(K))), (K + 1), L, r) | |
108 | + | else $Tuple4(J, K, L, r) | |
109 | + | } | |
110 | + | ||
111 | + | ||
112 | + | func R (E,m) = if ((assetBalance(E, fromBase58String(m)) == 1)) | |
101 | 113 | then unit | |
102 | 114 | else throw("Only asset owner") | |
103 | 115 | ||
104 | 116 | ||
105 | - | func | |
117 | + | func S (T,p) = if ((T[0].amount >= p)) | |
106 | 118 | then unit | |
107 | 119 | else throw("amount less then need") | |
108 | 120 | ||
109 | 121 | ||
110 | - | func | |
122 | + | func U (m) = if (valueOrElse(getBoolean(m), false)) | |
111 | 123 | then throw("this token already use") | |
112 | 124 | else unit | |
113 | 125 | ||
114 | 126 | ||
115 | - | func | |
127 | + | func V (E,r) = if ((t(q(r), "owner") != toString(E))) | |
116 | 128 | then throw("you haven't perms") | |
117 | 129 | else unit | |
118 | 130 | ||
119 | 131 | ||
120 | - | @Callable( | |
121 | - | func setString ( | |
132 | + | @Callable(W) | |
133 | + | func setString (X,Y) = valueOrElse(D(W.caller), [StringEntry(X, Y)]) | |
122 | 134 | ||
123 | 135 | ||
124 | 136 | ||
125 | - | @Callable( | |
126 | - | func setInt ( | |
137 | + | @Callable(W) | |
138 | + | func setInt (X,Y) = valueOrElse(D(W.caller), [IntegerEntry(X, Y)]) | |
127 | 139 | ||
128 | 140 | ||
129 | 141 | ||
130 | - | @Callable( | |
131 | - | func deleteEntry ( | |
142 | + | @Callable(W) | |
143 | + | func deleteEntry (X) = valueOrElse(D(W.caller), [DeleteEntry(X)]) | |
132 | 144 | ||
133 | 145 | ||
134 | 146 | ||
135 | - | @Callable( | |
136 | - | func init ( | |
147 | + | @Callable(W) | |
148 | + | func init (Z,aa,ab,ac) = valueOrElse(D(W.caller), [StringEntry("collectionName", Z), StringEntry("symbol", aa), StringEntry("description", ab), IntegerEntry("totalAmount", 0), StringEntry("baseURI", ac)]) | |
137 | 149 | ||
138 | 150 | ||
139 | 151 | ||
140 | - | @Callable( | |
141 | - | func setUser (m, | |
142 | - | let | |
143 | - | if (( | |
152 | + | @Callable(W) | |
153 | + | func setUser (m,ad,ae) = { | |
154 | + | let af = invoke(f, "makeJSON", [["user", "expires"], [ad, ae]], nil) | |
155 | + | if ((af == af)) | |
144 | 156 | then $Tuple2([StringEntry(("userOf-" + m), { | |
145 | - | let x = | |
157 | + | let x = af | |
146 | 158 | if ($isInstanceOf(x, "String")) | |
147 | 159 | then x | |
148 | 160 | else throw(($getType(x) + " couldn't be cast to String")) | |
149 | - | })], | |
161 | + | })], af) | |
150 | 162 | else throw("Strict value is not equal to itself.") | |
151 | 163 | } | |
152 | 164 | ||
153 | 165 | ||
154 | 166 | ||
155 | - | @Callable( | |
156 | - | func setTokenPayment ( | |
167 | + | @Callable(W) | |
168 | + | func setTokenPayment (ag) = valueOrElse(D(W.caller), [BinaryEntry("tokenPayment", ag)]) | |
157 | 169 | ||
158 | 170 | ||
159 | 171 | ||
160 | - | @Callable( | |
172 | + | @Callable(W) | |
161 | 173 | func mintTokens (o,p) = { | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | if (( | |
166 | - | then [ | |
174 | + | let ah = Reissue(g, p, true) | |
175 | + | let ai = Address(fromBase58String(o)) | |
176 | + | let aj = n(ai, p, g) | |
177 | + | if ((aj == aj)) | |
178 | + | then [aj, ah] | |
167 | 179 | else throw("Strict value is not equal to itself.") | |
168 | 180 | } | |
169 | 181 | ||
170 | 182 | ||
171 | 183 | ||
172 | - | @Callable( | |
184 | + | @Callable(W) | |
173 | 185 | func mintNFT (o) = { | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
178 | - | then | |
179 | - | else | |
180 | - | let | |
181 | - | let | |
182 | - | let x = invoke(f, "makeJSON", [["tokenURI"], [ | |
186 | + | let ak = (d + 1) | |
187 | + | let al = toString(ak) | |
188 | + | let am = ((b + "#") + al) | |
189 | + | let an = if ((16 >= size(am))) | |
190 | + | then am | |
191 | + | else al | |
192 | + | let ao = (e + al) | |
193 | + | let ap = { | |
194 | + | let x = invoke(f, "makeJSON", [["tokenURI"], [ao]], nil) | |
183 | 195 | if ($isInstanceOf(x, "String")) | |
184 | 196 | then x | |
185 | 197 | else throw(($getType(x) + " couldn't be cast to String")) | |
186 | 198 | } | |
187 | - | let | |
188 | - | let m = calculateAssetId( | |
189 | - | let | |
190 | - | let | |
191 | - | if (( | |
192 | - | then [ | |
199 | + | let aq = Issue(an, ap, 1, 0, false, unit, height) | |
200 | + | let m = calculateAssetId(aq) | |
201 | + | let ai = Address(fromBase58String(o)) | |
202 | + | let aj = n(ai, 1, m) | |
203 | + | if ((aj == aj)) | |
204 | + | then [aq, aj, IntegerEntry("totalAmount", ak), StringEntry(an, ao)] | |
193 | 205 | else throw("Strict value is not equal to itself.") | |
194 | 206 | } | |
195 | 207 | ||
196 | 208 | ||
197 | 209 | ||
198 | - | @Callable( | |
199 | - | func initLend (m,w,B, | |
200 | - | let | |
201 | - | let | |
202 | - | let x = invoke(f, "readByJSONKey", [ | |
210 | + | @Callable(W) | |
211 | + | func initLend (m,w,B,ar) = valueOrElse(R(W.caller, m), valueOrElse(U(m), { | |
212 | + | let aq = l(m) | |
213 | + | let ao = { | |
214 | + | let x = invoke(f, "readByJSONKey", [aq.description, "tokenURI"], nil) | |
203 | 215 | if ($isInstanceOf(x, "String")) | |
204 | 216 | then x | |
205 | 217 | else throw(($getType(x) + " couldn't be cast to String")) | |
206 | 218 | } | |
207 | - | if (( | |
219 | + | if ((ao == ao)) | |
208 | 220 | then { | |
209 | 221 | let u = { | |
210 | - | let x = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", m, | |
222 | + | let x = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", m, ao, toString(W.caller), toString(w), toString(B), toString(ar), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (w * ar))), "0", "0"]], nil) | |
211 | 223 | if ($isInstanceOf(x, "String")) | |
212 | 224 | then x | |
213 | 225 | else throw(($getType(x) + " couldn't be cast to String")) | |
224 | 236 | ||
225 | 237 | ||
226 | 238 | ||
227 | - | @Callable( | |
228 | - | func initRent (r, | |
239 | + | @Callable(W) | |
240 | + | func initRent (r,ar) = valueOrElse(S(W.payments, z(r, ar)), { | |
229 | 241 | let s = toString(r) | |
230 | 242 | let u = getStringValue(("lend-" + s)) | |
231 | - | let | |
232 | - | let | |
243 | + | let as = y(r) | |
244 | + | let at = toString(as) | |
233 | 245 | let w = { | |
234 | 246 | let x = invoke(f, "readByJSONKey", [u, "timeUnitSeconds"], nil) | |
235 | 247 | if ($isInstanceOf(x, "String")) | |
238 | 250 | } | |
239 | 251 | if ((w == w)) | |
240 | 252 | then { | |
241 | - | let | |
242 | - | if (( | |
253 | + | let au = parseIntValue(w) | |
254 | + | if ((au == au)) | |
243 | 255 | then { | |
244 | - | let | |
245 | - | let x = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString( | |
256 | + | let av = { | |
257 | + | let x = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(W.caller), toString(ar), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (au * ar))), "0"]], nil) | |
246 | 258 | if ($isInstanceOf(x, "String")) | |
247 | 259 | then x | |
248 | 260 | else throw(($getType(x) + " couldn't be cast to String")) | |
249 | 261 | } | |
250 | - | if (( | |
251 | - | then [IntegerEntry(("lend-rentCount-" + s), ( | |
262 | + | if ((av == av)) | |
263 | + | then [IntegerEntry(("lend-rentCount-" + s), (as + 1)), StringEntry(((("lend-rent-" + s) + "-") + at), av), IntegerEntry(("lend-cost-" + s), (z(r, ar) + C(r)))] | |
252 | 264 | else throw("Strict value is not equal to itself.") | |
253 | 265 | } | |
254 | 266 | else throw("Strict value is not equal to itself.") | |
258 | 270 | ||
259 | 271 | ||
260 | 272 | ||
261 | - | @Callable( | |
262 | - | func closeLend (r) = valueOrElse( | |
273 | + | @Callable(W) | |
274 | + | func closeLend (r) = valueOrElse(V(W.caller, r), { | |
263 | 275 | let s = toString(r) | |
264 | - | let au = ( let av = k | |
265 | - | let aw = size(av) | |
266 | - | let ax = $Tuple4(nil, 0, 0, s) | |
267 | - | func ay (az,aA) = if ((aA >= aw)) | |
268 | - | then az | |
269 | - | else F(az, av[aA]) | |
276 | + | let aw = getIntegerValue(("lend-rentCount-" + s)) | |
277 | + | let ax = ( let ay = k | |
278 | + | let az = size(ay) | |
279 | + | let aA = $Tuple4(nil, 0, aw, s) | |
280 | + | func aB (aC,aD) = if ((aD >= az)) | |
281 | + | then aC | |
282 | + | else F(aC, ay[aD]) | |
270 | 283 | ||
271 | - | func | |
272 | - | then | |
284 | + | func aE (aC,aD) = if ((aD >= az)) | |
285 | + | then aC | |
273 | 286 | else throw("List size exceeds 100") | |
274 | 287 | ||
275 | - | aB(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ax, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100))._1 | |
276 | - | let aC = [DeleteEntry(("lend-" + s)), DeleteEntry(("lend-rentCount-" + s)), DeleteEntry(("lend-cost-" + s)), IntegerEntry("lendCurrentCount", (j - 1)), ScriptTransfer(U.caller, C(r), g)] | |
277 | - | let aD = { | |
278 | - | let av = aC | |
279 | - | let aw = size(av) | |
280 | - | let ax = au | |
281 | - | func aE (az,aA) = if ((aA >= aw)) | |
282 | - | then az | |
283 | - | else M(az, av[aA]) | |
284 | - | ||
285 | - | func aF (az,aA) = if ((aA >= aw)) | |
286 | - | then az | |
287 | - | else throw("List size exceeds 100") | |
288 | - | ||
289 | - | aF(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(ax, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
290 | - | } | |
291 | - | aD | |
288 | + | aE(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aA, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100))._1 | |
289 | + | let m = t(q(r), "assetId") | |
290 | + | let aF = [BooleanEntry(m, false), DeleteEntry(("lend-cost-" + s)), ScriptTransfer(W.caller, C(r), g)] | |
291 | + | aF | |
292 | 292 | }) | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | ||
296 | - | @Callable( | |
296 | + | @Callable(W) | |
297 | 297 | func test () = { | |
298 | 298 | let aG = ["1", "2", "3"] | |
299 | - | let aH = { | |
300 | - | let av = aG | |
301 | - | let aw = size(av) | |
302 | - | let ax = aG | |
303 | - | func ay (az,aA) = if ((aA >= aw)) | |
304 | - | then az | |
305 | - | else N(az, av[aA]) | |
299 | + | let aH = ( let ay = k | |
300 | + | let az = size(ay) | |
301 | + | let aA = $Tuple4(aG, 0, 5, "5") | |
302 | + | func aB (aC,aD) = if ((aD >= az)) | |
303 | + | then aC | |
304 | + | else P(aC, ay[aD]) | |
306 | 305 | ||
307 | - | func aB (az,aA) = if ((aA >= aw)) | |
308 | - | then az | |
306 | + | func aE (aC,aD) = if ((aD >= az)) | |
307 | + | then aC | |
308 | + | else throw("List size exceeds 100") | |
309 | + | ||
310 | + | aE(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aA, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100))._1 | |
311 | + | [StringEntry("Debug", { | |
312 | + | let ay = aH | |
313 | + | let az = size(ay) | |
314 | + | let aA = "" | |
315 | + | func aI (aC,aD) = if ((aD >= az)) | |
316 | + | then aC | |
317 | + | else O(aC, ay[aD]) | |
318 | + | ||
319 | + | func aJ (aC,aD) = if ((aD >= az)) | |
320 | + | then aC | |
309 | 321 | else throw("List size exceeds 100") | |
310 | 322 | ||
311 | - | aB(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ax, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
312 | - | } | |
313 | - | [StringEntry("Debug", { | |
314 | - | let av = aG | |
315 | - | let aw = size(av) | |
316 | - | let ax = "" | |
317 | - | func aE (az,aA) = if ((aA >= aw)) | |
318 | - | then az | |
319 | - | else O(az, av[aA]) | |
320 | - | ||
321 | - | func aF (az,aA) = if ((aA >= aw)) | |
322 | - | then az | |
323 | - | else throw("List size exceeds 100") | |
324 | - | ||
325 | - | aF(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(ax, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
323 | + | aJ(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aA, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
326 | 324 | })] | |
327 | 325 | } | |
328 | 326 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = getStringValue("collectionName") | |
5 | 5 | ||
6 | 6 | let b = getStringValue("symbol") | |
7 | 7 | ||
8 | 8 | let c = getStringValue("description") | |
9 | 9 | ||
10 | 10 | let d = getIntegerValue("totalAmount") | |
11 | 11 | ||
12 | 12 | let e = getStringValue("baseURI") | |
13 | 13 | ||
14 | 14 | let f = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7")) | |
15 | 15 | ||
16 | 16 | let g = getBinaryValue("tokenPayment") | |
17 | 17 | ||
18 | 18 | let h = valueOrErrorMessage(assetInfo(getBinaryValue("tokenPayment")), "token payment asset doesn't connect") | |
19 | 19 | ||
20 | 20 | let i = getIntegerValue("lendCount") | |
21 | 21 | ||
22 | 22 | let j = getIntegerValue("lendCurrentCount") | |
23 | 23 | ||
24 | 24 | let k = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] | |
25 | 25 | ||
26 | 26 | func l (m) = valueOrErrorMessage(assetInfo(fromBase58String(m)), "Can't find asset by asset id") | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func n (o,p,m) = if ((o == this)) | |
30 | 30 | then StringEntry("smth", "smth") | |
31 | 31 | else ScriptTransfer(o, p, m) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func q (r) = { | |
35 | 35 | let s = toString(r) | |
36 | 36 | getStringValue(("lend-" + s)) | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func t (u,v) = { | |
41 | 41 | let w = { | |
42 | 42 | let x = invoke(f, "readByJSONKey", [u, v], nil) | |
43 | 43 | if ($isInstanceOf(x, "String")) | |
44 | 44 | then x | |
45 | 45 | else throw(($getType(x) + " couldn't be cast to String")) | |
46 | 46 | } | |
47 | 47 | if ((w == w)) | |
48 | 48 | then w | |
49 | 49 | else throw("Strict value is not equal to itself.") | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func y (r) = { | |
54 | 54 | let s = toString(r) | |
55 | 55 | getIntegerValue(("lend-rentCount-" + s)) | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func z (r,w) = { | |
60 | 60 | let u = q(r) | |
61 | 61 | let A = t(u, "timeUnitPrice") | |
62 | 62 | if ((A == A)) | |
63 | 63 | then { | |
64 | 64 | let B = parseIntValue(A) | |
65 | 65 | (w * B) | |
66 | 66 | } | |
67 | 67 | else throw("Strict value is not equal to itself.") | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func C (r) = valueOrElse(getInteger(("lend-cost-" + toString(r))), 0) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func D (E) = if ((E == this)) | |
75 | 75 | then unit | |
76 | 76 | else throw("Only internal call") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func F (G,H) = { | |
80 | 80 | let I = G | |
81 | 81 | let J = I._1 | |
82 | 82 | let K = I._2 | |
83 | 83 | let L = I._3 | |
84 | 84 | let r = I._4 | |
85 | 85 | if ((L > K)) | |
86 | - | then $ | |
86 | + | then $Tuple4((J :+ DeleteEntry(((("lend-rent-" + r) + "-") + toString(K)))), (K + 1), L, r) | |
87 | 87 | else G | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func M (G,H) = (G :+ H) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func N (G,H) = (G :+ H) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func O (G,H) = ((G + "-") + H) | |
98 | 98 | ||
99 | 99 | ||
100 | - | func P (E,m) = if ((assetBalance(E, fromBase58String(m)) == 1)) | |
100 | + | func P (G,H) = { | |
101 | + | let Q = G | |
102 | + | let J = Q._1 | |
103 | + | let K = Q._2 | |
104 | + | let L = Q._3 | |
105 | + | let r = Q._4 | |
106 | + | if ((L > K)) | |
107 | + | then $Tuple4((J :+ ((("lend-rent-" + r) + "-") + toString(K))), (K + 1), L, r) | |
108 | + | else $Tuple4(J, K, L, r) | |
109 | + | } | |
110 | + | ||
111 | + | ||
112 | + | func R (E,m) = if ((assetBalance(E, fromBase58String(m)) == 1)) | |
101 | 113 | then unit | |
102 | 114 | else throw("Only asset owner") | |
103 | 115 | ||
104 | 116 | ||
105 | - | func | |
117 | + | func S (T,p) = if ((T[0].amount >= p)) | |
106 | 118 | then unit | |
107 | 119 | else throw("amount less then need") | |
108 | 120 | ||
109 | 121 | ||
110 | - | func | |
122 | + | func U (m) = if (valueOrElse(getBoolean(m), false)) | |
111 | 123 | then throw("this token already use") | |
112 | 124 | else unit | |
113 | 125 | ||
114 | 126 | ||
115 | - | func | |
127 | + | func V (E,r) = if ((t(q(r), "owner") != toString(E))) | |
116 | 128 | then throw("you haven't perms") | |
117 | 129 | else unit | |
118 | 130 | ||
119 | 131 | ||
120 | - | @Callable( | |
121 | - | func setString ( | |
132 | + | @Callable(W) | |
133 | + | func setString (X,Y) = valueOrElse(D(W.caller), [StringEntry(X, Y)]) | |
122 | 134 | ||
123 | 135 | ||
124 | 136 | ||
125 | - | @Callable( | |
126 | - | func setInt ( | |
137 | + | @Callable(W) | |
138 | + | func setInt (X,Y) = valueOrElse(D(W.caller), [IntegerEntry(X, Y)]) | |
127 | 139 | ||
128 | 140 | ||
129 | 141 | ||
130 | - | @Callable( | |
131 | - | func deleteEntry ( | |
142 | + | @Callable(W) | |
143 | + | func deleteEntry (X) = valueOrElse(D(W.caller), [DeleteEntry(X)]) | |
132 | 144 | ||
133 | 145 | ||
134 | 146 | ||
135 | - | @Callable( | |
136 | - | func init ( | |
147 | + | @Callable(W) | |
148 | + | func init (Z,aa,ab,ac) = valueOrElse(D(W.caller), [StringEntry("collectionName", Z), StringEntry("symbol", aa), StringEntry("description", ab), IntegerEntry("totalAmount", 0), StringEntry("baseURI", ac)]) | |
137 | 149 | ||
138 | 150 | ||
139 | 151 | ||
140 | - | @Callable( | |
141 | - | func setUser (m, | |
142 | - | let | |
143 | - | if (( | |
152 | + | @Callable(W) | |
153 | + | func setUser (m,ad,ae) = { | |
154 | + | let af = invoke(f, "makeJSON", [["user", "expires"], [ad, ae]], nil) | |
155 | + | if ((af == af)) | |
144 | 156 | then $Tuple2([StringEntry(("userOf-" + m), { | |
145 | - | let x = | |
157 | + | let x = af | |
146 | 158 | if ($isInstanceOf(x, "String")) | |
147 | 159 | then x | |
148 | 160 | else throw(($getType(x) + " couldn't be cast to String")) | |
149 | - | })], | |
161 | + | })], af) | |
150 | 162 | else throw("Strict value is not equal to itself.") | |
151 | 163 | } | |
152 | 164 | ||
153 | 165 | ||
154 | 166 | ||
155 | - | @Callable( | |
156 | - | func setTokenPayment ( | |
167 | + | @Callable(W) | |
168 | + | func setTokenPayment (ag) = valueOrElse(D(W.caller), [BinaryEntry("tokenPayment", ag)]) | |
157 | 169 | ||
158 | 170 | ||
159 | 171 | ||
160 | - | @Callable( | |
172 | + | @Callable(W) | |
161 | 173 | func mintTokens (o,p) = { | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | if (( | |
166 | - | then [ | |
174 | + | let ah = Reissue(g, p, true) | |
175 | + | let ai = Address(fromBase58String(o)) | |
176 | + | let aj = n(ai, p, g) | |
177 | + | if ((aj == aj)) | |
178 | + | then [aj, ah] | |
167 | 179 | else throw("Strict value is not equal to itself.") | |
168 | 180 | } | |
169 | 181 | ||
170 | 182 | ||
171 | 183 | ||
172 | - | @Callable( | |
184 | + | @Callable(W) | |
173 | 185 | func mintNFT (o) = { | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
178 | - | then | |
179 | - | else | |
180 | - | let | |
181 | - | let | |
182 | - | let x = invoke(f, "makeJSON", [["tokenURI"], [ | |
186 | + | let ak = (d + 1) | |
187 | + | let al = toString(ak) | |
188 | + | let am = ((b + "#") + al) | |
189 | + | let an = if ((16 >= size(am))) | |
190 | + | then am | |
191 | + | else al | |
192 | + | let ao = (e + al) | |
193 | + | let ap = { | |
194 | + | let x = invoke(f, "makeJSON", [["tokenURI"], [ao]], nil) | |
183 | 195 | if ($isInstanceOf(x, "String")) | |
184 | 196 | then x | |
185 | 197 | else throw(($getType(x) + " couldn't be cast to String")) | |
186 | 198 | } | |
187 | - | let | |
188 | - | let m = calculateAssetId( | |
189 | - | let | |
190 | - | let | |
191 | - | if (( | |
192 | - | then [ | |
199 | + | let aq = Issue(an, ap, 1, 0, false, unit, height) | |
200 | + | let m = calculateAssetId(aq) | |
201 | + | let ai = Address(fromBase58String(o)) | |
202 | + | let aj = n(ai, 1, m) | |
203 | + | if ((aj == aj)) | |
204 | + | then [aq, aj, IntegerEntry("totalAmount", ak), StringEntry(an, ao)] | |
193 | 205 | else throw("Strict value is not equal to itself.") | |
194 | 206 | } | |
195 | 207 | ||
196 | 208 | ||
197 | 209 | ||
198 | - | @Callable( | |
199 | - | func initLend (m,w,B, | |
200 | - | let | |
201 | - | let | |
202 | - | let x = invoke(f, "readByJSONKey", [ | |
210 | + | @Callable(W) | |
211 | + | func initLend (m,w,B,ar) = valueOrElse(R(W.caller, m), valueOrElse(U(m), { | |
212 | + | let aq = l(m) | |
213 | + | let ao = { | |
214 | + | let x = invoke(f, "readByJSONKey", [aq.description, "tokenURI"], nil) | |
203 | 215 | if ($isInstanceOf(x, "String")) | |
204 | 216 | then x | |
205 | 217 | else throw(($getType(x) + " couldn't be cast to String")) | |
206 | 218 | } | |
207 | - | if (( | |
219 | + | if ((ao == ao)) | |
208 | 220 | then { | |
209 | 221 | let u = { | |
210 | - | let x = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", m, | |
222 | + | let x = invoke(f, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed"], ["0", m, ao, toString(W.caller), toString(w), toString(B), toString(ar), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (w * ar))), "0", "0"]], nil) | |
211 | 223 | if ($isInstanceOf(x, "String")) | |
212 | 224 | then x | |
213 | 225 | else throw(($getType(x) + " couldn't be cast to String")) | |
214 | 226 | } | |
215 | 227 | if ((u == u)) | |
216 | 228 | then { | |
217 | 229 | let s = toString(i) | |
218 | 230 | [IntegerEntry("lendCount", (i + 1)), IntegerEntry("lendCurrentCount", (j + 1)), IntegerEntry(("lend-rentCount-" + s), 0), StringEntry(("lend-" + s), u), BooleanEntry(m, true)] | |
219 | 231 | } | |
220 | 232 | else throw("Strict value is not equal to itself.") | |
221 | 233 | } | |
222 | 234 | else throw("Strict value is not equal to itself.") | |
223 | 235 | })) | |
224 | 236 | ||
225 | 237 | ||
226 | 238 | ||
227 | - | @Callable( | |
228 | - | func initRent (r, | |
239 | + | @Callable(W) | |
240 | + | func initRent (r,ar) = valueOrElse(S(W.payments, z(r, ar)), { | |
229 | 241 | let s = toString(r) | |
230 | 242 | let u = getStringValue(("lend-" + s)) | |
231 | - | let | |
232 | - | let | |
243 | + | let as = y(r) | |
244 | + | let at = toString(as) | |
233 | 245 | let w = { | |
234 | 246 | let x = invoke(f, "readByJSONKey", [u, "timeUnitSeconds"], nil) | |
235 | 247 | if ($isInstanceOf(x, "String")) | |
236 | 248 | then x | |
237 | 249 | else throw(($getType(x) + " couldn't be cast to String")) | |
238 | 250 | } | |
239 | 251 | if ((w == w)) | |
240 | 252 | then { | |
241 | - | let | |
242 | - | if (( | |
253 | + | let au = parseIntValue(w) | |
254 | + | if ((au == au)) | |
243 | 255 | then { | |
244 | - | let | |
245 | - | let x = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString( | |
256 | + | let av = { | |
257 | + | let x = invoke(f, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(W.caller), toString(ar), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (au * ar))), "0"]], nil) | |
246 | 258 | if ($isInstanceOf(x, "String")) | |
247 | 259 | then x | |
248 | 260 | else throw(($getType(x) + " couldn't be cast to String")) | |
249 | 261 | } | |
250 | - | if (( | |
251 | - | then [IntegerEntry(("lend-rentCount-" + s), ( | |
262 | + | if ((av == av)) | |
263 | + | then [IntegerEntry(("lend-rentCount-" + s), (as + 1)), StringEntry(((("lend-rent-" + s) + "-") + at), av), IntegerEntry(("lend-cost-" + s), (z(r, ar) + C(r)))] | |
252 | 264 | else throw("Strict value is not equal to itself.") | |
253 | 265 | } | |
254 | 266 | else throw("Strict value is not equal to itself.") | |
255 | 267 | } | |
256 | 268 | else throw("Strict value is not equal to itself.") | |
257 | 269 | }) | |
258 | 270 | ||
259 | 271 | ||
260 | 272 | ||
261 | - | @Callable( | |
262 | - | func closeLend (r) = valueOrElse( | |
273 | + | @Callable(W) | |
274 | + | func closeLend (r) = valueOrElse(V(W.caller, r), { | |
263 | 275 | let s = toString(r) | |
264 | - | let au = ( let av = k | |
265 | - | let aw = size(av) | |
266 | - | let ax = $Tuple4(nil, 0, 0, s) | |
267 | - | func ay (az,aA) = if ((aA >= aw)) | |
268 | - | then az | |
269 | - | else F(az, av[aA]) | |
276 | + | let aw = getIntegerValue(("lend-rentCount-" + s)) | |
277 | + | let ax = ( let ay = k | |
278 | + | let az = size(ay) | |
279 | + | let aA = $Tuple4(nil, 0, aw, s) | |
280 | + | func aB (aC,aD) = if ((aD >= az)) | |
281 | + | then aC | |
282 | + | else F(aC, ay[aD]) | |
270 | 283 | ||
271 | - | func | |
272 | - | then | |
284 | + | func aE (aC,aD) = if ((aD >= az)) | |
285 | + | then aC | |
273 | 286 | else throw("List size exceeds 100") | |
274 | 287 | ||
275 | - | aB(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ax, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100))._1 | |
276 | - | let aC = [DeleteEntry(("lend-" + s)), DeleteEntry(("lend-rentCount-" + s)), DeleteEntry(("lend-cost-" + s)), IntegerEntry("lendCurrentCount", (j - 1)), ScriptTransfer(U.caller, C(r), g)] | |
277 | - | let aD = { | |
278 | - | let av = aC | |
279 | - | let aw = size(av) | |
280 | - | let ax = au | |
281 | - | func aE (az,aA) = if ((aA >= aw)) | |
282 | - | then az | |
283 | - | else M(az, av[aA]) | |
284 | - | ||
285 | - | func aF (az,aA) = if ((aA >= aw)) | |
286 | - | then az | |
287 | - | else throw("List size exceeds 100") | |
288 | - | ||
289 | - | aF(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(ax, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
290 | - | } | |
291 | - | aD | |
288 | + | aE(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aA, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100))._1 | |
289 | + | let m = t(q(r), "assetId") | |
290 | + | let aF = [BooleanEntry(m, false), DeleteEntry(("lend-cost-" + s)), ScriptTransfer(W.caller, C(r), g)] | |
291 | + | aF | |
292 | 292 | }) | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | ||
296 | - | @Callable( | |
296 | + | @Callable(W) | |
297 | 297 | func test () = { | |
298 | 298 | let aG = ["1", "2", "3"] | |
299 | - | let aH = { | |
300 | - | let av = aG | |
301 | - | let aw = size(av) | |
302 | - | let ax = aG | |
303 | - | func ay (az,aA) = if ((aA >= aw)) | |
304 | - | then az | |
305 | - | else N(az, av[aA]) | |
299 | + | let aH = ( let ay = k | |
300 | + | let az = size(ay) | |
301 | + | let aA = $Tuple4(aG, 0, 5, "5") | |
302 | + | func aB (aC,aD) = if ((aD >= az)) | |
303 | + | then aC | |
304 | + | else P(aC, ay[aD]) | |
306 | 305 | ||
307 | - | func aB (az,aA) = if ((aA >= aw)) | |
308 | - | then az | |
306 | + | func aE (aC,aD) = if ((aD >= az)) | |
307 | + | then aC | |
308 | + | else throw("List size exceeds 100") | |
309 | + | ||
310 | + | aE(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aB(aA, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100))._1 | |
311 | + | [StringEntry("Debug", { | |
312 | + | let ay = aH | |
313 | + | let az = size(ay) | |
314 | + | let aA = "" | |
315 | + | func aI (aC,aD) = if ((aD >= az)) | |
316 | + | then aC | |
317 | + | else O(aC, ay[aD]) | |
318 | + | ||
319 | + | func aJ (aC,aD) = if ((aD >= az)) | |
320 | + | then aC | |
309 | 321 | else throw("List size exceeds 100") | |
310 | 322 | ||
311 | - | aB(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(ax, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
312 | - | } | |
313 | - | [StringEntry("Debug", { | |
314 | - | let av = aG | |
315 | - | let aw = size(av) | |
316 | - | let ax = "" | |
317 | - | func aE (az,aA) = if ((aA >= aw)) | |
318 | - | then az | |
319 | - | else O(az, av[aA]) | |
320 | - | ||
321 | - | func aF (az,aA) = if ((aA >= aw)) | |
322 | - | then az | |
323 | - | else throw("List size exceeds 100") | |
324 | - | ||
325 | - | aF(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(aE(ax, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
323 | + | aJ(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aI(aA, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
326 | 324 | })] | |
327 | 325 | } | |
328 | 326 | ||
329 | 327 |
github/deemru/w8io/169f3d6 75.83 ms ◑