tx · 6UizN46Thsu4CYNoex9qvHATgwUN7amsVoqCP5Rq1qar 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb: -0.00700000 Waves 2023.03.17 20:50 [2494327] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves
{ "type": 13, "id": "6UizN46Thsu4CYNoex9qvHATgwUN7amsVoqCP5Rq1qar", "fee": 700000, "feeAssetId": null, "timestamp": 1679075428756, "version": 2, "chainId": 84, "sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb", "senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK", "proofs": [ "5byEuysrUEHRgWeeqoddwcF9GyN4um5mP4LKkWuDe345zf879rtdPGjx6dev7FL7uKseXYDb8GAVjaQYCYtxL9dz" ], "script": "base64:BgJTCAISBAoCGBgSBQoDCBgYEgQKAggIEgQKAggIEgQKAggIEgUKAwgICBIDCgECEgMKAQgSBAoCCAgSBQoDCAgIEgQKAggIEgYKBAgBAQESBAoCAQEKAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTgpAQIOY29sbGVjdGlvbk5hbWUABnN5bWJvbAkBEUBleHRyTmF0aXZlKDEwNTgpAQIGc3ltYm9sAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTgpAQILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1NSkBAgt0b3RhbEFtb3VudAAIZEFwcEpzb24JAQdBZGRyZXNzAQkA2QQBAiMzTXJHYVpWUmhrbkVHZkhKMTl0dFVQTm5EUm9GcWNIaFZONwAMdG9rZW5QYXltZW50CQEHQWRkcmVzcwEJARFAZXh0ck5hdGl2ZSgxMDU3KQECDHRva2VuUGF5bWVudAEMb25seUludGVybmFsAQZjYWxsZXIDCQAAAgUGY2FsbGVyBQR0aGlzBQR1bml0CQACAQIST25seSB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uBQtuZXdMZW5kSnNvbgQGaW5zZXJ0CgABQAkA/AcEBQhkQXBwSnNvbgIJYWRkVG9KU09OCQDMCAIIBQpkZWxldGVMZW5kAl8yCQDMCAIJAMwIAgUGbGVuZElkCQDMCAICCWxlbmRDb3VudAUDbmlsCQDMCAIJAMwIAgULbmV3TGVuZEpzb24JAMwIAgUMbmV3TGVuZENvdW50BQNuaWwFA25pbAUDbmlsAwkAAQIFAUACBlN0cmluZwUBQAkAAgEJAKwCAgkAAwEFAUACGyBjb3VsZG4ndCBiZSBjYXN0IHRvIFN0cmluZwMJAAACBQZpbnNlcnQFBmluc2VydAkAzAgCCQELU3RyaW5nRW50cnkCAgVMZW5kcwUGaW5zZXJ0BQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AyMIqnQ==", "height": 2494327, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EoYXaCXCFLuJZWJCV1wBATPTUHo4SKcbf5PTQNyMA3Bj Next: Ac7KgJShdfGeVRyAYi9gHEqRks3d8tp4u92cfn2k2T1Y Diff:
Old | New | Differences | |
---|---|---|---|
156 | 156 | if ((K == K)) | |
157 | 157 | then { | |
158 | 158 | let L = K._1 | |
159 | - | let M = toString((parseIntValue(L) + 1)) | |
160 | - | let N = { | |
161 | - | let x = invoke(e, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed", "rents"], ["0", k, z, toString(n.caller), toString(G), toString(H), toString(I), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (G * I))), "0", "0", "{\"name\":\"Rents\",\"rentCount\":\"0\"}"]], nil) | |
162 | - | if ($isInstanceOf(x, "String")) | |
163 | - | then x | |
164 | - | else throw(($getType(x) + " couldn't be cast to String")) | |
165 | - | } | |
166 | - | if ((N == N)) | |
167 | - | then { | |
168 | - | let O = { | |
169 | - | let x = invoke(e, "addToJSON", [K._2, [L, "lendCount"], [N, M]], nil) | |
170 | - | if ($isInstanceOf(x, "String")) | |
171 | - | then x | |
172 | - | else throw(($getType(x) + " couldn't be cast to String")) | |
173 | - | } | |
174 | - | if ((O == O)) | |
175 | - | then [StringEntry("Lends", O)] | |
176 | - | else throw("Strict value is not equal to itself.") | |
177 | - | } | |
178 | - | else throw("Strict value is not equal to itself.") | |
159 | + | [StringEntry("Debug", L)] | |
179 | 160 | } | |
180 | 161 | else throw("Strict value is not equal to itself.") | |
181 | 162 | } | |
186 | 167 | ||
187 | 168 | @Callable(n) | |
188 | 169 | func initRent (L,I) = { | |
189 | - | let | |
170 | + | let M = toString(L) | |
190 | 171 | let J = getStringValue("Lends") | |
191 | - | let | |
172 | + | let N = { | |
192 | 173 | let x = invoke(e, "deleteByJSONKey", [J, "lendCount"], nil) | |
193 | 174 | if ($isInstanceOf(x, "(String, String)")) | |
194 | 175 | then x | |
195 | 176 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
196 | 177 | } | |
197 | - | if (( | |
178 | + | if ((N == N)) | |
198 | 179 | then { | |
199 | - | let | |
200 | - | let x = invoke(e, "deleteByJSONKey", [ | |
180 | + | let O = { | |
181 | + | let x = invoke(e, "deleteByJSONKey", [N._2, M], nil) | |
201 | 182 | if ($isInstanceOf(x, "(String, String)")) | |
202 | 183 | then x | |
203 | 184 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
204 | 185 | } | |
205 | - | if (( | |
186 | + | if ((O == O)) | |
206 | 187 | then { | |
207 | - | let | |
208 | - | let x = invoke(e, "deleteByJSONKey", [ | |
188 | + | let P = { | |
189 | + | let x = invoke(e, "deleteByJSONKey", [O._1, "rents"], nil) | |
209 | 190 | if ($isInstanceOf(x, "(String, String)")) | |
210 | 191 | then x | |
211 | 192 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
212 | 193 | } | |
213 | - | if (( | |
194 | + | if ((P == P)) | |
214 | 195 | then { | |
215 | - | let | |
216 | - | let x = invoke(e, "deleteByJSONKey", [ | |
196 | + | let Q = { | |
197 | + | let x = invoke(e, "deleteByJSONKey", [P._1, "rentCount"], nil) | |
217 | 198 | if ($isInstanceOf(x, "(String, String)")) | |
218 | 199 | then x | |
219 | 200 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
220 | 201 | } | |
221 | - | if (( | |
202 | + | if ((Q == Q)) | |
222 | 203 | then { | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
204 | + | let R = Q._1 | |
205 | + | let S = toString((parseIntValue(N._1) + 1)) | |
206 | + | let T = toString((parseIntValue(R) + 1)) | |
226 | 207 | let G = parseIntValue({ | |
227 | - | let x = invoke(e, "readByJSONKey", [ | |
208 | + | let x = invoke(e, "readByJSONKey", [P._2, "timeUnitSeconds"], nil) | |
228 | 209 | if ($isInstanceOf(x, "String")) | |
229 | 210 | then x | |
230 | 211 | else throw(($getType(x) + " couldn't be cast to String")) | |
231 | 212 | }) | |
232 | 213 | if ((G == G)) | |
233 | 214 | then { | |
234 | - | let | |
215 | + | let U = { | |
235 | 216 | let x = invoke(e, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(n.caller), "0", I, toString(lastBlock.timestamp), toString((lastBlock.timestamp + (G * I))), "0"]], nil) | |
236 | 217 | if ($isInstanceOf(x, "String")) | |
237 | 218 | then x | |
238 | 219 | else throw(($getType(x) + " couldn't be cast to String")) | |
239 | 220 | } | |
240 | - | if (( | |
221 | + | if ((U == U)) | |
241 | 222 | then { | |
242 | - | let | |
243 | - | if (( | |
223 | + | let V = invoke(e, "addToJSON", [Q._2, [R, "rentCount"], [U, T]], nil) | |
224 | + | if ((V == V)) | |
244 | 225 | then { | |
245 | - | let | |
246 | - | if (( | |
226 | + | let W = invoke(e, "addToJSON", [P._2, ["rents"], [V]], nil) | |
227 | + | if ((W == W)) | |
247 | 228 | then { | |
248 | - | let | |
249 | - | let x = invoke(e, "addToJSON", [ | |
229 | + | let X = { | |
230 | + | let x = invoke(e, "addToJSON", [O._2, [L, "lendCount"], [W, S]], nil) | |
250 | 231 | if ($isInstanceOf(x, "String")) | |
251 | 232 | then x | |
252 | 233 | else throw(($getType(x) + " couldn't be cast to String")) | |
253 | 234 | } | |
254 | - | if (( | |
255 | - | then [StringEntry("Lends", | |
235 | + | if ((X == X)) | |
236 | + | then [StringEntry("Lends", X)] | |
256 | 237 | else throw("Strict value is not equal to itself.") | |
257 | 238 | } | |
258 | 239 | else throw("Strict value is not equal to itself.") |
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 = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7")) | |
13 | 13 | ||
14 | 14 | let f = Address(getBinaryValue("tokenPayment")) | |
15 | 15 | ||
16 | 16 | func g (h) = if ((h == this)) | |
17 | 17 | then unit | |
18 | 18 | else throw("Only internal call") | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func i (j,k) = if ((j == this)) | |
22 | 22 | then StringEntry("костыль", "костыль") | |
23 | 23 | else ScriptTransfer(j, 1, k) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func l (k) = valueOrErrorMessage(assetInfo(fromBase58String(k)), "Can't find asset by asset id") | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func m (h,k) = if ((assetBalance(h, fromBase58String(k)) == 1)) | |
30 | 30 | then unit | |
31 | 31 | else throw("Only asset owner") | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | @Callable(n) | |
35 | 35 | func makeJSONInternal (o,p) = valueOrElse(g(n.caller), { | |
36 | 36 | let q = invoke(e, "makeJSON", [o, p], nil) | |
37 | 37 | if ((q == q)) | |
38 | 38 | then $Tuple2(nil, q) | |
39 | 39 | else throw("Strict value is not equal to itself.") | |
40 | 40 | }) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | ||
44 | 44 | @Callable(n) | |
45 | 45 | func addToJSONInternal (r,o,p) = valueOrElse(g(n.caller), { | |
46 | 46 | let q = invoke(e, "addToJSON", [r, o, p], nil) | |
47 | 47 | if ((q == q)) | |
48 | 48 | then $Tuple2(nil, q) | |
49 | 49 | else throw("Strict value is not equal to itself.") | |
50 | 50 | }) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | ||
54 | 54 | @Callable(n) | |
55 | 55 | func readByJSONKeyInternal (r,s) = valueOrElse(g(n.caller), { | |
56 | 56 | let q = invoke(e, "readByJSONKey", [r, s], nil) | |
57 | 57 | if ((q == q)) | |
58 | 58 | then $Tuple2(nil, q) | |
59 | 59 | else throw("Strict value is not equal to itself.") | |
60 | 60 | }) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | ||
64 | 64 | @Callable(n) | |
65 | 65 | func deleteByJSONKeyInternal (r,s) = valueOrElse(g(n.caller), { | |
66 | 66 | let q = invoke(e, "deleteByJSONKey", [r, s], nil) | |
67 | 67 | if ((q == q)) | |
68 | 68 | then $Tuple2(nil, q) | |
69 | 69 | else throw("Strict value is not equal to itself.") | |
70 | 70 | }) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | ||
74 | 74 | @Callable(n) | |
75 | 75 | func storageJsonInternal (t,u) = valueOrElse(g(n.caller), [StringEntry(t, u)]) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | ||
79 | 79 | @Callable(n) | |
80 | 80 | func setUser (k,v,w) = { | |
81 | 81 | let q = invoke(e, "makeJSON", [["user", "expires"], [v, w]], nil) | |
82 | 82 | if ((q == q)) | |
83 | 83 | then $Tuple2([StringEntry(("userOf-" + k), { | |
84 | 84 | let x = q | |
85 | 85 | if ($isInstanceOf(x, "String")) | |
86 | 86 | then x | |
87 | 87 | else throw(($getType(x) + " couldn't be cast to String")) | |
88 | 88 | })], q) | |
89 | 89 | else throw("Strict value is not equal to itself.") | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | ||
94 | 94 | @Callable(n) | |
95 | 95 | func setTokenPayment (k) = valueOrElse(g(n.caller), [BinaryEntry("tokenPayment", k)]) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | ||
99 | 99 | @Callable(n) | |
100 | 100 | func deleteValueByKey (s) = valueOrElse(g(n.caller), [DeleteEntry(s)]) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | ||
104 | 104 | @Callable(n) | |
105 | 105 | func setString (s,y) = valueOrElse(g(n.caller), [StringEntry(s, y)]) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | ||
109 | 109 | @Callable(n) | |
110 | 110 | func init (a,b,c) = valueOrElse(g(n.caller), [StringEntry("collectionName", a), StringEntry("symbol", b), StringEntry("description", c), IntegerEntry("totalAmount", 0)]) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(n) | |
115 | 115 | func mint (j,z) = { | |
116 | 116 | let A = (d + 1) | |
117 | 117 | let B = ((b + "#") + toString(A)) | |
118 | 118 | let C = if ((16 >= size(B))) | |
119 | 119 | then B | |
120 | 120 | else toString(A) | |
121 | 121 | let r = { | |
122 | 122 | let x = invoke(e, "makeJSON", [["tokenURI"], [z]], nil) | |
123 | 123 | if ($isInstanceOf(x, "String")) | |
124 | 124 | then x | |
125 | 125 | else throw(($getType(x) + " couldn't be cast to String")) | |
126 | 126 | } | |
127 | 127 | let D = Issue(C, r, 1, 0, false, unit, height) | |
128 | 128 | let k = calculateAssetId(D) | |
129 | 129 | let E = Address(fromBase58String(j)) | |
130 | 130 | let F = i(E, k) | |
131 | 131 | if ((F == F)) | |
132 | 132 | then [D, F, IntegerEntry("totalAmount", A), StringEntry(C, z)] | |
133 | 133 | else throw("Strict value is not equal to itself.") | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | ||
138 | 138 | @Callable(n) | |
139 | 139 | func initLend (k,G,H,I) = valueOrElse(m(n.caller, k), { | |
140 | 140 | let D = l(k) | |
141 | 141 | let z = { | |
142 | 142 | let x = invoke(e, "readByJSONKey", [D.description, "tokenURI"], nil) | |
143 | 143 | if ($isInstanceOf(x, "String")) | |
144 | 144 | then x | |
145 | 145 | else throw(($getType(x) + " couldn't be cast to String")) | |
146 | 146 | } | |
147 | 147 | if ((z == z)) | |
148 | 148 | then { | |
149 | 149 | let J = getStringValue("Lends") | |
150 | 150 | let K = { | |
151 | 151 | let x = invoke(e, "deleteByJSONKey", [J, "lendCount"], nil) | |
152 | 152 | if ($isInstanceOf(x, "(String, String)")) | |
153 | 153 | then x | |
154 | 154 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
155 | 155 | } | |
156 | 156 | if ((K == K)) | |
157 | 157 | then { | |
158 | 158 | let L = K._1 | |
159 | - | let M = toString((parseIntValue(L) + 1)) | |
160 | - | let N = { | |
161 | - | let x = invoke(e, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed", "rents"], ["0", k, z, toString(n.caller), toString(G), toString(H), toString(I), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (G * I))), "0", "0", "{\"name\":\"Rents\",\"rentCount\":\"0\"}"]], nil) | |
162 | - | if ($isInstanceOf(x, "String")) | |
163 | - | then x | |
164 | - | else throw(($getType(x) + " couldn't be cast to String")) | |
165 | - | } | |
166 | - | if ((N == N)) | |
167 | - | then { | |
168 | - | let O = { | |
169 | - | let x = invoke(e, "addToJSON", [K._2, [L, "lendCount"], [N, M]], nil) | |
170 | - | if ($isInstanceOf(x, "String")) | |
171 | - | then x | |
172 | - | else throw(($getType(x) + " couldn't be cast to String")) | |
173 | - | } | |
174 | - | if ((O == O)) | |
175 | - | then [StringEntry("Lends", O)] | |
176 | - | else throw("Strict value is not equal to itself.") | |
177 | - | } | |
178 | - | else throw("Strict value is not equal to itself.") | |
159 | + | [StringEntry("Debug", L)] | |
179 | 160 | } | |
180 | 161 | else throw("Strict value is not equal to itself.") | |
181 | 162 | } | |
182 | 163 | else throw("Strict value is not equal to itself.") | |
183 | 164 | }) | |
184 | 165 | ||
185 | 166 | ||
186 | 167 | ||
187 | 168 | @Callable(n) | |
188 | 169 | func initRent (L,I) = { | |
189 | - | let | |
170 | + | let M = toString(L) | |
190 | 171 | let J = getStringValue("Lends") | |
191 | - | let | |
172 | + | let N = { | |
192 | 173 | let x = invoke(e, "deleteByJSONKey", [J, "lendCount"], nil) | |
193 | 174 | if ($isInstanceOf(x, "(String, String)")) | |
194 | 175 | then x | |
195 | 176 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
196 | 177 | } | |
197 | - | if (( | |
178 | + | if ((N == N)) | |
198 | 179 | then { | |
199 | - | let | |
200 | - | let x = invoke(e, "deleteByJSONKey", [ | |
180 | + | let O = { | |
181 | + | let x = invoke(e, "deleteByJSONKey", [N._2, M], nil) | |
201 | 182 | if ($isInstanceOf(x, "(String, String)")) | |
202 | 183 | then x | |
203 | 184 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
204 | 185 | } | |
205 | - | if (( | |
186 | + | if ((O == O)) | |
206 | 187 | then { | |
207 | - | let | |
208 | - | let x = invoke(e, "deleteByJSONKey", [ | |
188 | + | let P = { | |
189 | + | let x = invoke(e, "deleteByJSONKey", [O._1, "rents"], nil) | |
209 | 190 | if ($isInstanceOf(x, "(String, String)")) | |
210 | 191 | then x | |
211 | 192 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
212 | 193 | } | |
213 | - | if (( | |
194 | + | if ((P == P)) | |
214 | 195 | then { | |
215 | - | let | |
216 | - | let x = invoke(e, "deleteByJSONKey", [ | |
196 | + | let Q = { | |
197 | + | let x = invoke(e, "deleteByJSONKey", [P._1, "rentCount"], nil) | |
217 | 198 | if ($isInstanceOf(x, "(String, String)")) | |
218 | 199 | then x | |
219 | 200 | else throw(($getType(x) + " couldn't be cast to (String, String)")) | |
220 | 201 | } | |
221 | - | if (( | |
202 | + | if ((Q == Q)) | |
222 | 203 | then { | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
204 | + | let R = Q._1 | |
205 | + | let S = toString((parseIntValue(N._1) + 1)) | |
206 | + | let T = toString((parseIntValue(R) + 1)) | |
226 | 207 | let G = parseIntValue({ | |
227 | - | let x = invoke(e, "readByJSONKey", [ | |
208 | + | let x = invoke(e, "readByJSONKey", [P._2, "timeUnitSeconds"], nil) | |
228 | 209 | if ($isInstanceOf(x, "String")) | |
229 | 210 | then x | |
230 | 211 | else throw(($getType(x) + " couldn't be cast to String")) | |
231 | 212 | }) | |
232 | 213 | if ((G == G)) | |
233 | 214 | then { | |
234 | - | let | |
215 | + | let U = { | |
235 | 216 | let x = invoke(e, "makeJSON", [["customer", "timeUnitCount", "startTimestamp", "endTimestamp", "closed"], [toString(n.caller), "0", I, toString(lastBlock.timestamp), toString((lastBlock.timestamp + (G * I))), "0"]], nil) | |
236 | 217 | if ($isInstanceOf(x, "String")) | |
237 | 218 | then x | |
238 | 219 | else throw(($getType(x) + " couldn't be cast to String")) | |
239 | 220 | } | |
240 | - | if (( | |
221 | + | if ((U == U)) | |
241 | 222 | then { | |
242 | - | let | |
243 | - | if (( | |
223 | + | let V = invoke(e, "addToJSON", [Q._2, [R, "rentCount"], [U, T]], nil) | |
224 | + | if ((V == V)) | |
244 | 225 | then { | |
245 | - | let | |
246 | - | if (( | |
226 | + | let W = invoke(e, "addToJSON", [P._2, ["rents"], [V]], nil) | |
227 | + | if ((W == W)) | |
247 | 228 | then { | |
248 | - | let | |
249 | - | let x = invoke(e, "addToJSON", [ | |
229 | + | let X = { | |
230 | + | let x = invoke(e, "addToJSON", [O._2, [L, "lendCount"], [W, S]], nil) | |
250 | 231 | if ($isInstanceOf(x, "String")) | |
251 | 232 | then x | |
252 | 233 | else throw(($getType(x) + " couldn't be cast to String")) | |
253 | 234 | } | |
254 | - | if (( | |
255 | - | then [StringEntry("Lends", | |
235 | + | if ((X == X)) | |
236 | + | then [StringEntry("Lends", X)] | |
256 | 237 | else throw("Strict value is not equal to itself.") | |
257 | 238 | } | |
258 | 239 | else throw("Strict value is not equal to itself.") | |
259 | 240 | } | |
260 | 241 | else throw("Strict value is not equal to itself.") | |
261 | 242 | } | |
262 | 243 | else throw("Strict value is not equal to itself.") | |
263 | 244 | } | |
264 | 245 | else throw("Strict value is not equal to itself.") | |
265 | 246 | } | |
266 | 247 | else throw("Strict value is not equal to itself.") | |
267 | 248 | } | |
268 | 249 | else throw("Strict value is not equal to itself.") | |
269 | 250 | } | |
270 | 251 | else throw("Strict value is not equal to itself.") | |
271 | 252 | } | |
272 | 253 | else throw("Strict value is not equal to itself.") | |
273 | 254 | } | |
274 | 255 | ||
275 | 256 |
github/deemru/w8io/169f3d6 65.69 ms ◑