tx · 5tNSZkqNw31guhiDBftFS9n98kLpUzWRhMRfuamMaMEs

3MyZr42eC2kca59w82tafyemrC7V2b97yxN:  -0.01000000 Waves

2022.07.06 14:17 [2127754] smart account 3MyZr42eC2kca59w82tafyemrC7V2b97yxN > SELF 0.00000000 Waves

{ "type": 13, "id": "5tNSZkqNw31guhiDBftFS9n98kLpUzWRhMRfuamMaMEs", "fee": 1000000, "feeAssetId": null, "timestamp": 1657106253954, "version": 2, "chainId": 84, "sender": "3MyZr42eC2kca59w82tafyemrC7V2b97yxN", "senderPublicKey": "4gLjFBxeVDJ31pmQaSSAuf5ZiLHzuSGQP6Vk6EHepAiy", "proofs": [ "55YSdajXdDxVLmYuNUsc5SUqNxEKGXwPrm5zEEumTMZ75Jm2vLDZpV3F9DJ123WdjNECCJvUaXbtpz9B3tFFugPD" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIIAQAAAAAAAAABAAAAAWkBAAAAGmluc2VydEludG9Tb3J0ZWRMaW5rZWRMaXN0AAAAAgAAAA1zb3J0ZWRMaXN0U3RyAAAACG5ld0VudHJ5BAAAAAhpZHhBcnJheQkABEwAAAACAAAAAAAAAAAACQAETAAAAAIAAAAAAAAAAAEJAARMAAAAAgAAAAAAAAAAAgkABEwAAAACAAAAAAAAAAADCQAETAAAAAIAAAAAAAAAAAQJAARMAAAAAgAAAAAAAAAABQkABEwAAAACAAAAAAAAAAAGCQAETAAAAAIAAAAAAAAAAAcJAARMAAAAAgAAAAAAAAAACAkABEwAAAACAAAAAAAAAAAJCQAETAAAAAIAAAAAAAAAAAoJAARMAAAAAgAAAAAAAAAACwkABEwAAAACAAAAAAAAAAAMCQAETAAAAAIAAAAAAAAAAA0JAARMAAAAAgAAAAAAAAAADgkABEwAAAACAAAAAAAAAAAPCQAETAAAAAIAAAAAAAAAABAJAARMAAAAAgAAAAAAAAAAEQkABEwAAAACAAAAAAAAAAASCQAETAAAAAIAAAAAAAAAABMFAAAAA25pbAQAAAAKc29ydGVkTGlzdA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AAAAARAAAAAAAAAAASAAAAAAAAAAATAAAAAAAAAAAUCQAFFAAAAAIFAAAAA25pbAUAAAASbW9kaWZpZWRTb3J0ZWRMaXN0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkbZ7U+", "height": 2127754, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DmuuVeDPUk8ux45jNoVesGQv4gNCkPY7vtzak6TL9bRZ Next: EmEc73AeJFuth5FRNU8rjDQgfVyfbwJvPpiu6wCh6ENn Diff:
OldNewDifferences
1010 if ((size(sortedList) >= size(idxArray)))
1111 then throw("passed sortedList size is too long...")
1212 else {
13- func internalInsert (newSortedList,idx) = if ((idx >= size(sortedList)))
14- then newSortedList
13+ func internalInsert (tupleResult,idx) = if ((idx >= size(sortedList)))
14+ then tupleResult
1515 else {
1616 let val = sortedList[idx]
17+ let newSortedList = tupleResult._1
1718 if (((idx + 1) == size(newSortedList)))
18- then if ((newEntry >= parseIntValue(val)))
19- then ((newSortedList :+ val) :+ toString(newEntry))
20- else ((newSortedList :+ toString(newEntry)) :+ val)
19+ then if ((tupleResult._2 == false))
20+ then if ((newEntry >= parseIntValue(val)))
21+ then $Tuple2(((newSortedList :+ val) :+ toString(newEntry)), true)
22+ else $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
23+ else $Tuple2((newSortedList :+ val), true)
2124 else if ((newEntry >= parseIntValue(val)))
22- then (newSortedList :+ val)
23- else ((newSortedList :+ toString(newEntry)) :+ val)
25+ then $Tuple2((newSortedList :+ val), false)
26+ else $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
2427 }
2528
2629 let modifiedSortedList = {
2730 let $l = idxArray
2831 let $s = size($l)
29- let $acc0 = nil
32+ let $acc0 = $Tuple2(nil, false)
3033 func $f0_1 ($a,$i) = if (($i >= $s))
3134 then $a
3235 else internalInsert($a, $l[$i])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func insertIntoSortedLinkedList (sortedListStr,newEntry) = {
88 let idxArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
99 let sortedList = split(sortedListStr, "__")
1010 if ((size(sortedList) >= size(idxArray)))
1111 then throw("passed sortedList size is too long...")
1212 else {
13- func internalInsert (newSortedList,idx) = if ((idx >= size(sortedList)))
14- then newSortedList
13+ func internalInsert (tupleResult,idx) = if ((idx >= size(sortedList)))
14+ then tupleResult
1515 else {
1616 let val = sortedList[idx]
17+ let newSortedList = tupleResult._1
1718 if (((idx + 1) == size(newSortedList)))
18- then if ((newEntry >= parseIntValue(val)))
19- then ((newSortedList :+ val) :+ toString(newEntry))
20- else ((newSortedList :+ toString(newEntry)) :+ val)
19+ then if ((tupleResult._2 == false))
20+ then if ((newEntry >= parseIntValue(val)))
21+ then $Tuple2(((newSortedList :+ val) :+ toString(newEntry)), true)
22+ else $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
23+ else $Tuple2((newSortedList :+ val), true)
2124 else if ((newEntry >= parseIntValue(val)))
22- then (newSortedList :+ val)
23- else ((newSortedList :+ toString(newEntry)) :+ val)
25+ then $Tuple2((newSortedList :+ val), false)
26+ else $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
2427 }
2528
2629 let modifiedSortedList = {
2730 let $l = idxArray
2831 let $s = size($l)
29- let $acc0 = nil
32+ let $acc0 = $Tuple2(nil, false)
3033 func $f0_1 ($a,$i) = if (($i >= $s))
3134 then $a
3235 else internalInsert($a, $l[$i])
3336
3437 func $f0_2 ($a,$i) = if (($i >= $s))
3538 then $a
3639 else throw("List size exceeds 20")
3740
3841 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
3942 }
4043 $Tuple2(nil, modifiedSortedList)
4144 }
4245 }
4346
4447
4548 @Verifier(tx)
4649 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4750

github/deemru/w8io/fabc49c 
28.23 ms