tx · E2sfCVfy74p7NhMhqHh7nJZEf6ygUchYbnJA4DfYdCjm

3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb:  -0.01100000 Waves

2023.03.17 23:19 [2494468] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves

{ "type": 13, "id": "E2sfCVfy74p7NhMhqHh7nJZEf6ygUchYbnJA4DfYdCjm", "fee": 1100000, "feeAssetId": null, "timestamp": 1679084344062, "version": 2, "chainId": 84, "sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb", "senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK", "proofs": [ "58w3vyA3xnbmTsbjLjdseeiBpKygYzdQ7a5iERc5dB7Eb4T9oEZHR837k2c1XnGdNvDL5fKvmthbWjvZnhheu2No" ], "script": "base64:BgIkCAISBwoFGBgBAQgSBAoCGBgSBQoDCBgYEgQKAggIEgQKAggIFgAIa0pzb25SZXMCB2pzb25SZXMABXF1b3RlCQCwCQEBASIBCW1ha2VGaWVsZAEJbmV4dFZhbHVlAwcJAKwCAgkArAICCQCsAgIJAKwCAgkArAICBQVxdW90ZQgFCW5leHRWYWx1ZQJfMQUFcXVvdGUCAToIBQluZXh0VmFsdWUCXzICASwJAKwCAgkArAICCQCsAgIJAKwCAgkArAICCQCsAgIJAKwCAgUFcXVvdGUIBQluZXh0VmFsdWUCXzEFBXF1b3RlAgE6BQVxdW90ZQgFCW5leHRWYWx1ZQJfMgUFcXVvdGUCASwBD3JlZHVjZXJNYWtlSlNPTgIFYWNjdW0JbmV4dFZhbHVlCQCsAgIFBWFjY3VtCQEJbWFrZUZpZWxkAQUJbmV4dFZhbHVlAQ9pdGVyYXRlTWFrZUpTT04DBnBhcmFtcwNyZXMGbGVuZ3RoAwkAAAIFBmxlbmd0aAAACQACAQINRW1wdHkgIHBhcmFtcwMJAAACBQZsZW5ndGgAAQoAAiRsBQZwYX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bGV0ZUJ5SlNPTktleQIEanNvbgNrZXkEDSR0MDEzNTMzMTM4ODQJARNkZWxldGVCeUtleUludGVybmFsAgUEanNvbgUDa2V5BBFkZWxldGVkVmFsdWVCeUtleQgFDSR0MDEzNTMzMTM4ODQCXzEEB25ld0pzb24IBQ0kdDAxMzUzMzEzODg0Al8yCQCUCgIJAMwIAgkBC1N0cmluZ0VudHJ5AgIMZGVsZXRlZFZhbHVlBRFkZWxldGVkVmFsdWVCeUtleQkAzAgCCQELU3RyaW5nRW50cnkCBQhrSnNvblJlcwUHbmV3SnNvbgUDbmlsCQCUCgIFEWRlbGV0ZWRWYWx1ZUJ5S2V5BQduZXdKc29uALbBvDc=", "height": 2494468, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9DeAUiSdpYgWPY1cqgrCcMVWaVrW99ShUE1Uc9GaLhLR Next: CTp9jQcjm1vPrpEWqJcR3pfM3WCRmssqjPAFWFd9Fa14 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let collectionName = getStringValue("collectionName")
4+let kJsonRes = "jsonRes"
55
6-let symbol = getStringValue("symbol")
6+let quote = toUtf8String(base58'b')
77
8-let description = getStringValue("description")
8+func makeField (nextValue) = if (false)
9+ then (((((quote + nextValue._1) + quote) + ":") + nextValue._2) + ",")
10+ else (((((((quote + nextValue._1) + quote) + ":") + quote) + nextValue._2) + quote) + ",")
911
10-let totalAmount = getIntegerValue("totalAmount")
1112
12-let dAppJson = Address(fromBase58String("3MrGaZVRhknEGfHJ19ttUPNnDRoFqcHhVN7"))
13+func reducerMakeJSON (accum,nextValue) = (accum + makeField(nextValue))
1314
14-let tokenPayment = Address(getBinaryValue("tokenPayment"))
15+
16+func iterateMakeJSON (params,res,length) = if ((length == 0))
17+ then throw("Empty params")
18+ else if ((length == 1))
19+ then {
20+ let $l = params
21+ let $s = size($l)
22+ let $acc0 = res
23+ func $f0_1 ($a,$i) = if (($i >= $s))
24+ then $a
25+ else reducerMakeJSON($a, $l[$i])
26+
27+ func $f0_2 ($a,$i) = if (($i >= $s))
28+ then $a
29+ else throw("List size exceeds 1")
30+
31+ $f0_2($f0_1($acc0, 0), 1)
32+ }
33+ else if ((length == 2))
34+ then {
35+ let $l = params
36+ let $s = size($l)
37+ let $acc0 = res
38+ func $f0_1 ($a,$i) = if (($i >= $s))
39+ then $a
40+ else reducerMakeJSON($a, $l[$i])
41+
42+ func $f0_2 ($a,$i) = if (($i >= $s))
43+ then $a
44+ else throw("List size exceeds 2")
45+
46+ $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
47+ }
48+ else if ((length == 3))
49+ then {
50+ let $l = params
51+ let $s = size($l)
52+ let $acc0 = res
53+ func $f0_1 ($a,$i) = if (($i >= $s))
54+ then $a
55+ else reducerMakeJSON($a, $l[$i])
56+
57+ func $f0_2 ($a,$i) = if (($i >= $s))
58+ then $a
59+ else throw("List size exceeds 3")
60+
61+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
62+ }
63+ else if ((length == 4))
64+ then {
65+ let $l = params
66+ let $s = size($l)
67+ let $acc0 = res
68+ func $f0_1 ($a,$i) = if (($i >= $s))
69+ then $a
70+ else reducerMakeJSON($a, $l[$i])
71+
72+ func $f0_2 ($a,$i) = if (($i >= $s))
73+ then $a
74+ else throw("List size exceeds 4")
75+
76+ $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4)
77+ }
78+ else if ((length == 5))
79+ then {
80+ let $l = params
81+ let $s = size($l)
82+ let $acc0 = res
83+ func $f0_1 ($a,$i) = if (($i >= $s))
84+ then $a
85+ else reducerMakeJSON($a, $l[$i])
86+
87+ func $f0_2 ($a,$i) = if (($i >= $s))
88+ then $a
89+ else throw("List size exceeds 5")
90+
91+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
92+ }
93+ else if ((length == 6))
94+ then {
95+ let $l = params
96+ let $s = size($l)
97+ let $acc0 = res
98+ func $f0_1 ($a,$i) = if (($i >= $s))
99+ then $a
100+ else reducerMakeJSON($a, $l[$i])
101+
102+ func $f0_2 ($a,$i) = if (($i >= $s))
103+ then $a
104+ else throw("List size exceeds 6")
105+
106+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
107+ }
108+ else if ((length == 7))
109+ then {
110+ let $l = params
111+ let $s = size($l)
112+ let $acc0 = res
113+ func $f0_1 ($a,$i) = if (($i >= $s))
114+ then $a
115+ else reducerMakeJSON($a, $l[$i])
116+
117+ func $f0_2 ($a,$i) = if (($i >= $s))
118+ then $a
119+ else throw("List size exceeds 7")
120+
121+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7)
122+ }
123+ else if ((length == 8))
124+ then {
125+ let $l = params
126+ let $s = size($l)
127+ let $acc0 = res
128+ func $f0_1 ($a,$i) = if (($i >= $s))
129+ then $a
130+ else reducerMakeJSON($a, $l[$i])
131+
132+ func $f0_2 ($a,$i) = if (($i >= $s))
133+ then $a
134+ else throw("List size exceeds 8")
135+
136+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8)
137+ }
138+ else if ((length == 9))
139+ then {
140+ let $l = params
141+ let $s = size($l)
142+ let $acc0 = res
143+ func $f0_1 ($a,$i) = if (($i >= $s))
144+ then $a
145+ else reducerMakeJSON($a, $l[$i])
146+
147+ func $f0_2 ($a,$i) = if (($i >= $s))
148+ then $a
149+ else throw("List size exceeds 9")
150+
151+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9)
152+ }
153+ else if ((length == 10))
154+ then {
155+ let $l = params
156+ let $s = size($l)
157+ let $acc0 = res
158+ func $f0_1 ($a,$i) = if (($i >= $s))
159+ then $a
160+ else reducerMakeJSON($a, $l[$i])
161+
162+ func $f0_2 ($a,$i) = if (($i >= $s))
163+ then $a
164+ else throw("List size exceeds 10")
165+
166+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
167+ }
168+ else throw("The max number of parameters exceeded")
169+
170+
171+func getPartAndTail (arr) = {
172+ let el0 = arr[0]
173+ let el1 = arr[1]
174+ let el2 = arr[2]
175+ let el3 = arr[3]
176+ let el4 = arr[4]
177+ let el5 = arr[5]
178+ let el6 = arr[6]
179+ let el7 = arr[7]
180+ let el8 = arr[8]
181+ let el9 = arr[9]
182+ let arr0 = removeByIndex(arr, 0)
183+ let arr1 = removeByIndex(arr0, 0)
184+ let arr2 = removeByIndex(arr1, 0)
185+ let arr3 = removeByIndex(arr2, 0)
186+ let arr4 = removeByIndex(arr3, 0)
187+ let arr5 = removeByIndex(arr4, 0)
188+ let arr6 = removeByIndex(arr5, 0)
189+ let arr7 = removeByIndex(arr6, 0)
190+ let arr8 = removeByIndex(arr7, 0)
191+ let arr9 = removeByIndex(arr8, 0)
192+ $Tuple2([el0, el1, el2, el3, el4, el5, el6, el7, el8, el9], arr9)
193+ }
194+
15195
16196 func onlyInternal (caller) = if ((caller == this))
17197 then unit
18198 else throw("Only internal call")
19199
20200
21-func transferOrNot (to,assetId) = if ((to == this))
22- then StringEntry("костыль", "костыль")
23- else ScriptTransfer(to, 1, assetId)
201+func prepare_1 (arr,arr2) = [$Tuple2(arr[0], arr2[0])]
24202
25203
26-func parseIdtoAsset (assetId) = valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "Can't find asset by asset id")
204+func prepare_2 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1])]
27205
28206
29-func checkAssetOwner (caller,assetId) = if ((assetBalance(caller, fromBase58String(assetId)) == 1))
30- then unit
31- else throw("Only asset owner")
207+func prepare_3 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1]), $Tuple2(arr[2], arr2[2])]
208+
209+
210+func prepare_4 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1]), $Tuple2(arr[2], arr2[2]), $Tuple2(arr[3], arr2[3])]
211+
212+
213+func prepare_5 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1]), $Tuple2(arr[2], arr2[2]), $Tuple2(arr[3], arr2[3]), $Tuple2(arr[4], arr2[4])]
214+
215+
216+func prepare_6 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1]), $Tuple2(arr[2], arr2[2]), $Tuple2(arr[3], arr2[3]), $Tuple2(arr[4], arr2[4]), $Tuple2(arr[5], arr2[5])]
217+
218+
219+func prepare_7 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1]), $Tuple2(arr[2], arr2[2]), $Tuple2(arr[3], arr2[3]), $Tuple2(arr[4], arr2[4]), $Tuple2(arr[5], arr2[5]), $Tuple2(arr[6], arr2[6])]
220+
221+
222+func prepare_8 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1]), $Tuple2(arr[2], arr2[2]), $Tuple2(arr[3], arr2[3]), $Tuple2(arr[4], arr2[4]), $Tuple2(arr[5], arr2[5]), $Tuple2(arr[6], arr2[6]), $Tuple2(arr[7], arr2[7])]
223+
224+
225+func prepare_9 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1]), $Tuple2(arr[2], arr2[2]), $Tuple2(arr[3], arr2[3]), $Tuple2(arr[4], arr2[4]), $Tuple2(arr[5], arr2[5]), $Tuple2(arr[6], arr2[6]), $Tuple2(arr[7], arr2[7]), $Tuple2(arr[8], arr2[8])]
226+
227+
228+func prepare_10 (arr,arr2) = [$Tuple2(arr[0], arr2[0]), $Tuple2(arr[1], arr2[1]), $Tuple2(arr[2], arr2[2]), $Tuple2(arr[3], arr2[3]), $Tuple2(arr[4], arr2[4]), $Tuple2(arr[5], arr2[5]), $Tuple2(arr[6], arr2[6]), $Tuple2(arr[7], arr2[7]), $Tuple2(arr[8], arr2[8]), $Tuple2(arr[9], arr2[9])]
229+
230+
231+func prepareParams (currentArrPartKeys,currentArrPartValues,length) = if ((length == 0))
232+ then throw("Empty params")
233+ else if ((length == 1))
234+ then prepare_1(currentArrPartKeys, currentArrPartValues)
235+ else if ((length == 2))
236+ then prepare_2(currentArrPartKeys, currentArrPartValues)
237+ else if ((length == 3))
238+ then prepare_3(currentArrPartKeys, currentArrPartValues)
239+ else if ((length == 4))
240+ then prepare_4(currentArrPartKeys, currentArrPartValues)
241+ else if ((length == 5))
242+ then prepare_5(currentArrPartKeys, currentArrPartValues)
243+ else if ((length == 6))
244+ then prepare_6(currentArrPartKeys, currentArrPartValues)
245+ else if ((length == 7))
246+ then prepare_7(currentArrPartKeys, currentArrPartValues)
247+ else if ((length == 8))
248+ then prepare_8(currentArrPartKeys, currentArrPartValues)
249+ else if ((length == 9))
250+ then prepare_9(currentArrPartKeys, currentArrPartValues)
251+ else if ((length == 10))
252+ then prepare_10(currentArrPartKeys, currentArrPartValues)
253+ else throw("Max number of parameters exceeded")
254+
255+
256+func getStartAndEndIndexes (json,key) = {
257+ let keyLen = size(key)
258+ let startIndex = value(indexOf(json, key))
259+ let endIndex = valueOrElse(indexOf(json, ",", startIndex), value(indexOf(json, "}", startIndex)))
260+ $Tuple3(keyLen, startIndex, endIndex)
261+ }
262+
263+
264+func reducerTakeObject (accum,next) = {
265+ let $t063116360 = accum
266+ let result = $t063116360._1
267+ let leftCount = $t063116360._2
268+ let rightCount = $t063116360._3
269+ let end = $t063116360._4
270+ if (!(end))
271+ then $Tuple4(((result + next) + "check"), leftCount, rightCount, true)
272+ else accum
273+ }
274+
275+
276+func readByKeyInternal (json,key) = {
277+ let $t071757288 = getStartAndEndIndexes(json, key)
278+ let keyLen = $t071757288._1
279+ let startIndex = $t071757288._2
280+ let endIndex = $t071757288._3
281+ drop(take(json, (endIndex - 1)), ((startIndex + keyLen) + 3))
282+ }
283+
284+
285+func deleteByKeyInternal (json,key) = {
286+ let $t075627630 = getStartAndEndIndexes(json, key)
287+ let keyLen = $t075627630._1
288+ let startIndex = $t075627630._2
289+ let endIndex = $t075627630._3
290+ let rowValue = drop(take(json, (endIndex - 1)), ((startIndex + keyLen) + 3))
291+ let jsonList = split(json, ",")
292+ let deletedValue = if (contains(rowValue, "{"))
293+ then ( let $l = jsonList
294+ let $s = size($l)
295+ let $acc0 = $Tuple4("", 0, 0, false)
296+ func $f0_1 ($a,$i) = if (($i >= $s))
297+ then $a
298+ else reducerTakeObject($a, $l[$i])
299+
300+ func $f0_2 ($a,$i) = if (($i >= $s))
301+ then $a
302+ else throw("List size exceeds 10")
303+
304+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10))._1
305+ else rowValue
306+ let newJson = if (((size(json) - endIndex) == 1))
307+ then (take(json, (startIndex - 2)) + drop(json, endIndex))
308+ else (take(json, (startIndex - 1)) + drop(json, (endIndex + 1)))
309+ $Tuple2(deletedValue, newJson)
310+ }
32311
33312
34313 @Callable(i)
35-func makeJSONInternal (arrKeys,arrValues) = valueOrElse(onlyInternal(i.caller), {
36- let res = invoke(dAppJson, "makeJSON", [arrKeys, arrValues], nil)
37- if ((res == res))
38- then $Tuple2(nil, res)
39- else throw("Strict value is not equal to itself.")
40- })
314+func makeJSONInternal (arrKeys,arrValues,iterationsCount,lastIterationLen,res) = valueOrElse(onlyInternal(i.caller), if ((iterationsCount > 0))
315+ then {
316+ let $t089529114 = getPartAndTail(arrKeys)
317+ let currentArrPartKeys = $t089529114._1
318+ let arrTailKeys = $t089529114._2
319+ let $t091239238 = getPartAndTail(arrValues)
320+ let currentArrPartValues = $t091239238._1
321+ let arrTailValues = $t091239238._2
322+ let params = prepareParams(currentArrPartKeys, currentArrPartValues, 10)
323+ let newString = iterateMakeJSON(params, res, 10)
324+ let result = invoke(this, "makeJSONInternal", [arrTailKeys, arrTailValues, (iterationsCount - 1), lastIterationLen, newString], nil)
325+ if ((result == result))
326+ then $Tuple2(nil, result)
327+ else throw("Strict value is not equal to itself.")
328+ }
329+ else if ((lastIterationLen != 0))
330+ then {
331+ let params = prepareParams(arrKeys, arrValues, lastIterationLen)
332+ let newString = iterateMakeJSON(params, res, lastIterationLen)
333+ $Tuple2(nil, (("{" + dropRight(newString, 1)) + "}"))
334+ }
335+ else $Tuple2(nil, (("{" + dropRight(res, 1)) + "}")))
41336
42337
43338
44339 @Callable(i)
45-func addToJSONInternal (json,arrKeys,arrValues) = valueOrElse(onlyInternal(i.caller), {
46- let res = invoke(dAppJson, "addToJSON", [json, arrKeys, arrValues], nil)
47- if ((res == res))
48- then $Tuple2(nil, res)
49- else throw("Strict value is not equal to itself.")
50- })
340+func makeJSON (arrKeys,arrValues) = if ((size(arrKeys) != size(arrValues)))
341+ then throw("ArrayKeys and ArrayValues length must be equal")
342+ else {
343+ let len = size(arrKeys)
344+ let iterationsCount = fraction(1, len, 10)
345+ let lastIterationLen = (len % 10)
346+ let res = invoke(this, "makeJSONInternal", [arrKeys, arrValues, iterationsCount, lastIterationLen, ""], nil)
347+ if ((res == res))
348+ then $Tuple2(nil, res)
349+ else throw("Strict value is not equal to itself.")
350+ }
51351
52352
53353
54354 @Callable(i)
55-func readByJSONKeyInternal (json,key) = valueOrElse(onlyInternal(i.caller), {
56- let res = invoke(dAppJson, "readByJSONKey", [json, key], nil)
57- if ((res == res))
58- then $Tuple2(nil, res)
59- else throw("Strict value is not equal to itself.")
60- })
355+func addToJSON (json,arrKeys,arrValues) = if ((size(arrKeys) != size(arrValues)))
356+ then throw("ArrayKeys and ArrayValues length must be equal")
357+ else {
358+ let len = size(arrKeys)
359+ let iterationsCount = fraction(1, len, 10)
360+ let lastIterationLen = (len % 10)
361+ let res = invoke(this, "makeJSONInternal", [arrKeys, arrValues, iterationsCount, lastIterationLen, (drop(dropRight(json, 1), 1) + ",")], nil)
362+ if ((res == res))
363+ then $Tuple2(nil, res)
364+ else throw("Strict value is not equal to itself.")
365+ }
61366
62367
63368
64369 @Callable(i)
65-func deleteByJSONKeyInternal (json,key) = valueOrElse(onlyInternal(i.caller), {
66- let res = invoke(dAppJson, "deleteByJSONKey", [json, key], nil)
67- if ((res == res))
68- then $Tuple2(nil, res)
69- else throw("Strict value is not equal to itself.")
70- })
71-
72-
73-
74-@Callable(i)
75-func storageJsonInternal (jsonKey,jsonString) = valueOrElse(onlyInternal(i.caller), [StringEntry(jsonKey, jsonString)])
76-
77-
78-
79-@Callable(i)
80-func setUser (assetId,user,expires) = {
81- let res = invoke(dAppJson, "makeJSON", [["user", "expires"], [user, expires]], nil)
82- if ((res == res))
83- then $Tuple2([StringEntry(("userOf-" + assetId), {
84- let @ = res
85- if ($isInstanceOf(@, "String"))
86- then @
87- else throw(($getType(@) + " couldn't be cast to String"))
88- })], res)
89- else throw("Strict value is not equal to itself.")
370+func readByJSONKey (json,key) = {
371+ let valueByKey = readByKeyInternal(json, key)
372+ $Tuple2([StringEntry("valueByKey", valueByKey)], valueByKey)
90373 }
91374
92375
93376
94377 @Callable(i)
95-func setTokenPayment (assetId) = valueOrElse(onlyInternal(i.caller), [BinaryEntry("tokenPayment", assetId)])
96-
97-
98-
99-@Callable(i)
100-func deleteValueByKey (key) = valueOrElse(onlyInternal(i.caller), [DeleteEntry(key)])
101-
102-
103-
104-@Callable(i)
105-func setString (key,value) = valueOrElse(onlyInternal(i.caller), [StringEntry(key, value)])
106-
107-
108-
109-@Callable(i)
110-func init (collectionName,symbol,description) = valueOrElse(onlyInternal(i.caller), [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)])
111-
112-
113-
114-@Callable(i)
115-func mint (to,tokenURI) = {
116- let tokenId = (totalAmount + 1)
117- let preName = ((symbol + "#") + toString(tokenId))
118- let name = if ((16 >= size(preName)))
119- then preName
120- else toString(tokenId)
121- let json = {
122- let @ = invoke(dAppJson, "makeJSON", [["tokenURI"], [tokenURI]], nil)
123- if ($isInstanceOf(@, "String"))
124- then @
125- else throw(($getType(@) + " couldn't be cast to String"))
126- }
127- let asset = Issue(name, json, 1, 0, false, unit, height)
128- let assetId = calculateAssetId(asset)
129- let toAddress = Address(fromBase58String(to))
130- let transfer = transferOrNot(toAddress, assetId)
131- if ((transfer == transfer))
132- then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
133- else throw("Strict value is not equal to itself.")
134- }
135-
136-
137-
138-@Callable(i)
139-func initLend (assetId,timeUnitSeconds,timeUnitPrice,timeUnitCount) = valueOrElse(checkAssetOwner(i.caller, assetId), {
140- let asset = parseIdtoAsset(assetId)
141- let tokenURI = {
142- let @ = invoke(dAppJson, "readByJSONKey", [asset.description, "tokenURI"], nil)
143- if ($isInstanceOf(@, "String"))
144- then @
145- else throw(($getType(@) + " couldn't be cast to String"))
146- }
147- if ((tokenURI == tokenURI))
148- then {
149- let lends = getStringValue("Lends")
150- let delete = {
151- let @ = invoke(dAppJson, "deleteByJSONKey", [lends, "lendCount"], nil)
152- if ($isInstanceOf(@, "(String, String)"))
153- then @
154- else throw(($getType(@) + " couldn't be cast to (String, String)"))
155- }
156- if ((delete == delete))
157- then {
158- let lendId = delete._1
159- let newCount = toString((parseIntValue(lendId) + 1))
160- let make = {
161- let @ = invoke(dAppJson, "makeJSON", [["supportedInterface", "assetdId", "tokenURI", "owner", "timeUnitSeconds", "timeUnitPrice", "timeUnitCount", "startTimestamp", "endTimestamp", "deposit", "claimed", "rents"], ["0", assetId, tokenURI, toString(i.caller), toString(timeUnitSeconds), toString(timeUnitPrice), toString(timeUnitCount), toString(lastBlock.timestamp), toString((lastBlock.timestamp + (timeUnitSeconds * timeUnitCount))), "0", "0", "{\"name\":\"Rents\",\"rentCount\":\"0\"}"]], nil)
162- if ($isInstanceOf(@, "String"))
163- then @
164- else throw(($getType(@) + " couldn't be cast to String"))
165- }
166- if ((make == make))
167- then {
168- let insert = {
169- let @ = invoke(dAppJson, "addToJSON", [delete._2, [lendId, "lendCount"], [make, newCount]], nil)
170- if ($isInstanceOf(@, "String"))
171- then @
172- else throw(($getType(@) + " couldn't be cast to String"))
173- }
174- if ((insert == insert))
175- then [StringEntry("Lends", insert)]
176- else throw("Strict value is not equal to itself.")
177- }
178- else throw("Strict value is not equal to itself.")
179- }
180- else throw("Strict value is not equal to itself.")
181- }
182- else throw("Strict value is not equal to itself.")
183- })
184-
185-
186-
187-@Callable(i)
188-func initRent (lendId,timeUnitCount) = {
189- let lendIdString = toString(lendId)
190- let lends = getStringValue("Lends")
191- let deleteLendCount = {
192- let @ = invoke(dAppJson, "deleteByJSONKey", [lends, "lendCount"], nil)
193- if ($isInstanceOf(@, "(String, String)"))
194- then @
195- else throw(($getType(@) + " couldn't be cast to (String, String)"))
196- }
197- if ((deleteLendCount == deleteLendCount))
198- then {
199- let deleteLend = {
200- let @ = invoke(dAppJson, "deleteByJSONKey", [deleteLendCount._2, lendIdString], nil)
201- if ($isInstanceOf(@, "(String, String)"))
202- then @
203- else throw(($getType(@) + " couldn't be cast to (String, String)"))
204- }
205- if ((deleteLend == deleteLend))
206- then [StringEntry("Debug", deleteLend._1)]
207- else throw("Strict value is not equal to itself.")
208- }
209- else throw("Strict value is not equal to itself.")
378+func deleteByJSONKey (json,key) = {
379+ let $t01353313884 = deleteByKeyInternal(json, key)
380+ let deletedValueByKey = $t01353313884._1
381+ let newJson = $t01353313884._2
382+ $Tuple2([StringEntry("deletedValue", deletedValueByKey), StringEntry(kJsonRes, newJson)], $Tuple2(deletedValueByKey, newJson))
210383 }
211384
212385

github/deemru/w8io/169f3d6 
45.25 ms