tx · GAVjSyw788D5FD3fn21cAdgK7oG8eLzEHkbqjJFBnxBE 3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx: -0.10000000 Waves 2022.11.26 16:56 [2334173] smart account 3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx > SELF 0.00000000 Waves
{ "type": 13, "id": "GAVjSyw788D5FD3fn21cAdgK7oG8eLzEHkbqjJFBnxBE", "fee": 10000000, "feeAssetId": null, "timestamp": 1669470996424, "version": 2, "chainId": 84, "sender": "3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx", "senderPublicKey": "EKZmHJ5bK3qKKgRdq8rAamt9qrDbVMLARzRqXoQW258v", "proofs": [ "U1N7wpGyVdfKMMVjUE6xd8yrn3XbaNzoyx24f74YNPQWDpbN12rXw6ptdKcQbKhfMqFVrbYbsGQ2ogwb8wjwyh5" ], "script": "base64:BgJACAISCwoJCAgICAgBCAgIEgQKAggIEgMKAQgSAwoBARIDCgEBEgUKAwEICBIDCgEIEgMKAQgSAwoBCBIECgIIAScACXNlcGFyYXRvcgIBXwAIa0F1Y3Rpb24CB2F1Y3Rpb24ABWtTZWxsAgRzZWxsAAhrVHJ1c3RlZAIHdHJ1c3RlZAAGa1ByaWNlAgVwcmljZQEKZ2V0U2xvdEtleQIGcHJlZml4BW5mdElkCQCsAgIJAKwCAgUGcHJlZml4BQlzZXBhcmF0b3IJANgEAQUFbmZ0SWQBC2dldFByaWNlS2V5AQVuZnRJZAkArAICCQCsAgIFBmtQcmljZQUJc2VwYXJhdG9yCQDYBAEFBW5mdElkAQpnZXRTZWxsS2V5AQVuZnRJZAkArAICCQCsAgIFBWtTZWxsBQlzZXBhcmF0b3IJANgEAQUFbmZ0SWQBDWdldEF1Y3Rpb25LZXkBBW5mdElkCQCsAgIJAKwCAgUIa0F1Y3Rpb24FCXNlcGFyYXRvcgkA2AQBBQVuZnRJZAENZ2V0VHJ1c3RlZEtleQEGaXNzdWVyCQCsAgIJAKwCAgUIa1RydXN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BnNlbGxlcgABBQdhc3NldElkBQNuaWwBaQEQc2V0VHJ1c3RlZElzc3VlcgELdHJ1c3RlZEFkZHIDCQEBIQEJAQdpc0FkbWluAQgFAWkGY2FsbGVyCQACAQIKT25seSBhZG1pbgkAzAgCCQEMQm9vbGVhbkVudHJ5AgkBDWdldFRydXN0ZWRLZXkBCQERQGV4dHJOYXRpdmUoMTA2MikBBQt0cnVzdGVkQWRkcgYFA25pbAFpARdnZXRQcmljZUF0Q3VycmVudE1vbWVudAIFbmZ0SWQGbW9tZW50BAdhc3NldElkCQDZBAEFBW5mdElkBA0kdDAxMDcwNjEwNzY5CQEYY2FsY1ByaWNlQXRDdXJyZW50TW9tZW50AgUHYXNzZXRJZAUGbW9tZW50BAZzZWxsZXIIBQ0kdDAxMDcwNjEwNzY5Al8xBAVwcmljZQgFDSR0MDEwNzA2MTA3NjkCXzIJAMwIAgkBDEludGVnZXJFbnRyeQIJAQtnZXRQcmljZUtleQEFB2Fzc2V0SWQFBXByaWNlBQNuaWwAT06XRQ==", "height": 2334173, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4Y8Z9cWR9s7QZzhiaCcLXpTb9WX3r2zFV7jvbgoqHAu6 Next: Bz2T2jRARzgyDGz7McSDnuVUqwxpWNKS6LZbaPSJXq9n Diff:
Old | New | Differences | |
---|---|---|---|
126 | 126 | ||
127 | 127 | func E (r) = { | |
128 | 128 | let F = r | |
129 | - | if ($isInstanceOf(F, "(Address, Int, | |
129 | + | if ($isInstanceOf(F, "(Address, Int, String, String)")) | |
130 | 130 | then { | |
131 | 131 | let G = F | |
132 | - | q([toString(G._1), toString(G._2), | |
132 | + | q([toString(G._1), toString(G._2), G._3, G._4]) | |
133 | 133 | } | |
134 | 134 | else if ($isInstanceOf(F, "(Address, Int)")) | |
135 | 135 | then { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "_" | |
5 | 5 | ||
6 | 6 | let b = "auction" | |
7 | 7 | ||
8 | 8 | let c = "sell" | |
9 | 9 | ||
10 | 10 | let d = "trusted" | |
11 | 11 | ||
12 | 12 | let e = "price" | |
13 | 13 | ||
14 | 14 | func f (g,h) = ((g + a) + toBase58String(h)) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func i (h) = ((e + a) + toBase58String(h)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func j (h) = ((c + a) + toBase58String(h)) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func k (h) = ((b + a) + toBase58String(h)) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func l (m) = ((d + a) + toString(m)) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func n (o,p) = (o ++ [p]) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func q (r) = { | |
33 | 33 | let s = size(r) | |
34 | 34 | if ((s == 0)) | |
35 | 35 | then throw("Empty params") | |
36 | 36 | else if ((s == 1)) | |
37 | 37 | then makeString({ | |
38 | 38 | let t = r | |
39 | 39 | let u = size(t) | |
40 | 40 | let v = nil | |
41 | 41 | func w (x,y) = if ((y >= u)) | |
42 | 42 | then x | |
43 | 43 | else n(x, t[y]) | |
44 | 44 | ||
45 | 45 | func z (x,y) = if ((y >= u)) | |
46 | 46 | then x | |
47 | 47 | else throw("List size exceeds 1") | |
48 | 48 | ||
49 | 49 | z(w(v, 0), 1) | |
50 | 50 | }, a) | |
51 | 51 | else if ((s == 2)) | |
52 | 52 | then makeString({ | |
53 | 53 | let t = r | |
54 | 54 | let u = size(t) | |
55 | 55 | let v = nil | |
56 | 56 | func w (x,y) = if ((y >= u)) | |
57 | 57 | then x | |
58 | 58 | else n(x, t[y]) | |
59 | 59 | ||
60 | 60 | func z (x,y) = if ((y >= u)) | |
61 | 61 | then x | |
62 | 62 | else throw("List size exceeds 2") | |
63 | 63 | ||
64 | 64 | z(w(w(v, 0), 1), 2) | |
65 | 65 | }, a) | |
66 | 66 | else if ((s == 3)) | |
67 | 67 | then makeString({ | |
68 | 68 | let t = r | |
69 | 69 | let u = size(t) | |
70 | 70 | let v = nil | |
71 | 71 | func w (x,y) = if ((y >= u)) | |
72 | 72 | then x | |
73 | 73 | else n(x, t[y]) | |
74 | 74 | ||
75 | 75 | func z (x,y) = if ((y >= u)) | |
76 | 76 | then x | |
77 | 77 | else throw("List size exceeds 3") | |
78 | 78 | ||
79 | 79 | z(w(w(w(v, 0), 1), 2), 3) | |
80 | 80 | }, a) | |
81 | 81 | else if ((s == 4)) | |
82 | 82 | then makeString({ | |
83 | 83 | let t = r | |
84 | 84 | let u = size(t) | |
85 | 85 | let v = nil | |
86 | 86 | func w (x,y) = if ((y >= u)) | |
87 | 87 | then x | |
88 | 88 | else n(x, t[y]) | |
89 | 89 | ||
90 | 90 | func z (x,y) = if ((y >= u)) | |
91 | 91 | then x | |
92 | 92 | else throw("List size exceeds 4") | |
93 | 93 | ||
94 | 94 | z(w(w(w(w(v, 0), 1), 2), 3), 4) | |
95 | 95 | }, a) | |
96 | 96 | else if ((s == 5)) | |
97 | 97 | then makeString({ | |
98 | 98 | let t = r | |
99 | 99 | let u = size(t) | |
100 | 100 | let v = nil | |
101 | 101 | func w (x,y) = if ((y >= u)) | |
102 | 102 | then x | |
103 | 103 | else n(x, t[y]) | |
104 | 104 | ||
105 | 105 | func z (x,y) = if ((y >= u)) | |
106 | 106 | then x | |
107 | 107 | else throw("List size exceeds 5") | |
108 | 108 | ||
109 | 109 | z(w(w(w(w(w(v, 0), 1), 2), 3), 4), 5) | |
110 | 110 | }, a) | |
111 | 111 | else throw("Max number of parameters exceeded") | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func A (B) = { | |
116 | 116 | let C = split(B, a) | |
117 | 117 | $Tuple5(addressFromStringValue(C[0]), parseIntValue(C[1]), parseIntValue(C[2]), parseIntValue(C[3]), parseIntValue(C[4])) | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func D (B) = { | |
122 | 122 | let C = split(B, a) | |
123 | 123 | $Tuple2(addressFromStringValue(C[0]), parseIntValue(C[1])) | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func E (r) = { | |
128 | 128 | let F = r | |
129 | - | if ($isInstanceOf(F, "(Address, Int, | |
129 | + | if ($isInstanceOf(F, "(Address, Int, String, String)")) | |
130 | 130 | then { | |
131 | 131 | let G = F | |
132 | - | q([toString(G._1), toString(G._2), | |
132 | + | q([toString(G._1), toString(G._2), G._3, G._4]) | |
133 | 133 | } | |
134 | 134 | else if ($isInstanceOf(F, "(Address, Int)")) | |
135 | 135 | then { | |
136 | 136 | let H = F | |
137 | 137 | q([toString(H._1), toString(H._2)]) | |
138 | 138 | } | |
139 | 139 | else throw("Wrong params tupple") | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func I (J,h,K,L,M) = StringEntry(k(h), E($Tuple4(J, K, L, M))) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func N (h,O,P) = StringEntry(j(h), E($Tuple2(O, P))) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func Q (h) = value(getString(this, k(h))) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func R (h) = value(getString(this, j(h))) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func S (T,U) = { | |
156 | 156 | let B = Q(T) | |
157 | 157 | let V = A(B) | |
158 | 158 | let J = V._1 | |
159 | 159 | let W = V._2 | |
160 | 160 | let X = V._3 | |
161 | 161 | let Y = V._4 | |
162 | 162 | let Z = V._5 | |
163 | 163 | if ((U >= Z)) | |
164 | 164 | then $Tuple2(J, X) | |
165 | 165 | else { | |
166 | 166 | let aa = (W - X) | |
167 | 167 | let ab = (Z - Y) | |
168 | 168 | let ac = (U - Y) | |
169 | 169 | $Tuple2(J, (W - fraction(ac, aa, ab))) | |
170 | 170 | } | |
171 | 171 | } | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func ad (T) = { | |
175 | 175 | let F = assetInfo(T) | |
176 | 176 | if ($isInstanceOf(F, "Asset")) | |
177 | 177 | then { | |
178 | 178 | let ae = F | |
179 | 179 | if (if ((ae.decimals == 0)) | |
180 | 180 | then (ae.quantity == 1) | |
181 | 181 | else false) | |
182 | 182 | then (ae.reissuable == false) | |
183 | 183 | else false | |
184 | 184 | } | |
185 | 185 | else false | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func af (T) = { | |
190 | 190 | let m = value(assetInfo(T)).issuer | |
191 | 191 | valueOrElse(getBoolean(this, l(m)), false) | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func ag (T) = isDefined(getString(this, j(T))) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func ah (T) = isDefined(getString(this, k(T))) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func ai (P) = (P > 0) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func aj (K,ak) = (K > ak) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func al (am) = (am == this) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func an (am,J) = if ((am == this)) | |
211 | 211 | then true | |
212 | 212 | else (am == J) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func ao (ap,M) = (ap > M) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func aq (ar,as) = (ar >= as) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func at (T) = (T == unit) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func au (h) = if (!(ad(h))) | |
225 | 225 | then throw("Token is not Nft") | |
226 | 226 | else if (ag(h)) | |
227 | 227 | then throw("Sell already exists") | |
228 | 228 | else if (ah(h)) | |
229 | 229 | then throw("Auction already exists") | |
230 | 230 | else unit | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func av (aw,ax,P) = if (!(at(aw))) | |
234 | 234 | then throw("Payment must be at WAVES") | |
235 | 235 | else if (!(aq(ax, P))) | |
236 | 236 | then throw("Not enough funds") | |
237 | 237 | else unit | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func ay () = 0 | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func az () = 0 | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func aA (aB,ax,aC) = if (aB) | |
247 | 247 | then $Tuple2((aC - az()), (ax - aC)) | |
248 | 248 | else $Tuple2((aC - ay()), (ax - aC)) | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func aD (h) = if (ag(h)) | |
252 | 252 | then $Tuple2(c, R(h)) | |
253 | 253 | else if (ah(h)) | |
254 | 254 | then $Tuple2(b, Q(h)) | |
255 | 255 | else throw("Slot doesn`t exist") | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | let aE = "buy" | |
259 | 259 | ||
260 | 260 | let aF = base58'EbLVSrAi6vS3AkLwBinzZCvAXP2yYiFJEzj1MBVHcwZ5' | |
261 | 261 | ||
262 | 262 | @Callable(aG) | |
263 | 263 | func createNft (aH,aI,aJ,aK,aL,aM,aN,aO,aP) = { | |
264 | 264 | let aQ = Issue(aH, aN, 1, 0, false) | |
265 | 265 | let aR = calculateAssetId(aQ) | |
266 | 266 | [aQ, ScriptTransfer(aG.caller, 1, aR), StringEntry(((toBase58String(aR) + a) + "Owner"), toString(aG.caller)), StringEntry(((toBase58String(aR) + a) + "nft_type"), aK), StringEntry(((toBase58String(aR) + a) + "nft_tags"), aL), StringEntry(((toBase58String(aR) + a) + "nft_dAppAddress"), aJ), IntegerEntry(((toBase58String(aR) + a) + "nft_selling_price"), aM), StringEntry(((toBase58String(aR) + a) + "nft_onSell"), aO), StringEntry(((toBase58String(aR) + a) + "nft_data"), aP)] | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | ||
271 | 271 | @Callable(aG) | |
272 | 272 | func issueNft (aS,aT) = { | |
273 | 273 | let aQ = Issue(aS, aT, 1, 0, false) | |
274 | 274 | let aR = calculateAssetId(aQ) | |
275 | 275 | [aQ, ScriptTransfer(aG.caller, 1, aR), StringEntry(((toBase58String(aR) + a) + "Owner"), toString(aG.caller))] | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | ||
280 | 280 | @Callable(aG) | |
281 | 281 | func buyNFT (aU) = { | |
282 | 282 | let T = fromBase58String(aU) | |
283 | 283 | let aV = value(aG.payments[0].amount) | |
284 | 284 | let aW = value(aG.payments[1].amount) | |
285 | 285 | let P = valueOrErrorMessage(getString(((e + a) + aU)), "There is no price for this NFT") | |
286 | 286 | let aX = valueOrErrorMessage(getStringValue(((aU + a) + "Owner")), "No owner") | |
287 | 287 | if ((aG.payments[0].assetId != unit)) | |
288 | 288 | then throw("Pay in waves") | |
289 | 289 | else if ((aG.payments[1].assetId != aF)) | |
290 | 290 | then throw("Pay in ASIMI") | |
291 | 291 | else if ((parseIntValue(P) > aV)) | |
292 | 292 | then throw("Invalid payment WAVES") | |
293 | 293 | else [ScriptTransfer(aG.caller, 1, T), ScriptTransfer(value(addressFromString(aX)), parseIntValue(P), unit), StringEntry(((toString(aG.caller) + a) + aE), ((aU + a) + toString(aV)))] | |
294 | 294 | } | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | ||
298 | 298 | @Callable(aG) | |
299 | 299 | func sellNFT (P) = { | |
300 | 300 | let aY = $Tuple2(value(aG.payments[0].assetId), value(aG.payments[0].amount)) | |
301 | 301 | let aZ = aY._1 | |
302 | 302 | let ba = aY._2 | |
303 | 303 | if (!(ad(aZ))) | |
304 | 304 | then throw("Token is not NFT") | |
305 | 305 | else [StringEntry(((e + a) + toBase58String(value(aG.payments[0].assetId))), toString(P)), StringEntry(((toString(aG.caller) + a) + c), ((toBase58String(aZ) + a) + toString(ba)))] | |
306 | 306 | } | |
307 | 307 | ||
308 | 308 | ||
309 | 309 | ||
310 | 310 | @Callable(aG) | |
311 | 311 | func addSell (P) = { | |
312 | 312 | let h = value(aG.payments[0].assetId) | |
313 | 313 | valueOrElse(au(h), if (!(ai(P))) | |
314 | 314 | then throw("Price must be > 0") | |
315 | 315 | else [N(h, aG.caller, P)]) | |
316 | 316 | } | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | ||
320 | 320 | @Callable(aG) | |
321 | 321 | func addAuction (K,L,M) = { | |
322 | 322 | let h = value(aG.payments[0].assetId) | |
323 | 323 | valueOrElse(au(h), [I(aG.caller, h, K, L, M), StringEntry(((toBase58String(h) + a) + "nft_owner"), toString(aG.caller))]) | |
324 | 324 | } | |
325 | 325 | ||
326 | 326 | ||
327 | 327 | ||
328 | 328 | @Callable(aG) | |
329 | 329 | func buyFromSlot (h) = { | |
330 | 330 | let bb = $Tuple2(aG.payments[0].assetId, value(aG.payments[0].amount)) | |
331 | 331 | let aw = bb._1 | |
332 | 332 | let ax = bb._2 | |
333 | 333 | let T = fromBase58String(h) | |
334 | 334 | let bc = aD(T) | |
335 | 335 | let bd = bc._1 | |
336 | 336 | let B = bc._2 | |
337 | 337 | let be = [ScriptTransfer(aG.caller, 1, T), DeleteEntry(f(bd, T))] | |
338 | 338 | if ((bd == c)) | |
339 | 339 | then { | |
340 | 340 | let bf = D(B) | |
341 | 341 | let J = bf._1 | |
342 | 342 | let bg = bf._2 | |
343 | 343 | valueOrElse(av(aw, ax, bg), { | |
344 | 344 | let bh = aA(af(T), ax, bg) | |
345 | 345 | let bi = bh._1 | |
346 | 346 | let bj = bh._2 | |
347 | 347 | let bk = (be ++ [ScriptTransfer(J, bi, unit)]) | |
348 | 348 | if ((bj > 0)) | |
349 | 349 | then (bk ++ [ScriptTransfer(aG.caller, bj, unit)]) | |
350 | 350 | else bk | |
351 | 351 | }) | |
352 | 352 | } | |
353 | 353 | else { | |
354 | 354 | let bl = S(T, height) | |
355 | 355 | let J = bl._1 | |
356 | 356 | let aC = bl._2 | |
357 | 357 | valueOrElse(av(aw, ax, aC), { | |
358 | 358 | let bm = aA(af(T), ax, aC) | |
359 | 359 | let bi = bm._1 | |
360 | 360 | let bj = bm._2 | |
361 | 361 | let bk = (be ++ [ScriptTransfer(J, bi, unit)]) | |
362 | 362 | if ((bj > 0)) | |
363 | 363 | then (bk ++ [ScriptTransfer(aG.caller, bj, unit)]) | |
364 | 364 | else bk | |
365 | 365 | }) | |
366 | 366 | } | |
367 | 367 | } | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | ||
371 | 371 | @Callable(aG) | |
372 | 372 | func declineSlot (h) = { | |
373 | 373 | let T = fromBase58String(h) | |
374 | 374 | let bn = aD(T) | |
375 | 375 | let bd = bn._1 | |
376 | 376 | let B = bn._2 | |
377 | 377 | let be = [DeleteEntry(f(bd, T))] | |
378 | 378 | if ((bd == c)) | |
379 | 379 | then { | |
380 | 380 | let bo = D(B) | |
381 | 381 | let J = bo._1 | |
382 | 382 | let bg = bo._2 | |
383 | 383 | if (!(an(aG.caller, J))) | |
384 | 384 | then throw("Invalid caller") | |
385 | 385 | else (be ++ [ScriptTransfer(J, 1, T)]) | |
386 | 386 | } | |
387 | 387 | else { | |
388 | 388 | let bp = A(B) | |
389 | 389 | let J = bp._1 | |
390 | 390 | let W = bp._2 | |
391 | 391 | let X = bp._3 | |
392 | 392 | let Y = bp._4 | |
393 | 393 | let Z = bp._5 | |
394 | 394 | if (!(an(aG.caller, J))) | |
395 | 395 | then throw("Invalid caller") | |
396 | 396 | else if (!(ao(height, Z))) | |
397 | 397 | then throw("Wait for end of auction") | |
398 | 398 | else (be ++ [ScriptTransfer(J, 1, T)]) | |
399 | 399 | } | |
400 | 400 | } | |
401 | 401 | ||
402 | 402 | ||
403 | 403 | ||
404 | 404 | @Callable(aG) | |
405 | 405 | func setTrustedIssuer (bq) = if (!(al(aG.caller))) | |
406 | 406 | then throw("Only admin") | |
407 | 407 | else [BooleanEntry(l(addressFromStringValue(bq)), true)] | |
408 | 408 | ||
409 | 409 | ||
410 | 410 | ||
411 | 411 | @Callable(aG) | |
412 | 412 | func getPriceAtCurrentMoment (h,U) = { | |
413 | 413 | let T = fromBase58String(h) | |
414 | 414 | let br = S(T, U) | |
415 | 415 | let J = br._1 | |
416 | 416 | let P = br._2 | |
417 | 417 | [IntegerEntry(i(T), P)] | |
418 | 418 | } | |
419 | 419 | ||
420 | 420 |
github/deemru/w8io/026f985 56.49 ms ◑