tx · E4k317uDTRPnPANtjsNzh44UGUJCUteEKAmYnzsC3xJn

3MyZr42eC2kca59w82tafyemrC7V2b97yxN:  -0.01000000 Waves

2022.07.06 14:21 [2127757] smart account 3MyZr42eC2kca59w82tafyemrC7V2b97yxN > SELF 0.00000000 Waves

{ "type": 13, "id": "E4k317uDTRPnPANtjsNzh44UGUJCUteEKAmYnzsC3xJn", "fee": 1000000, "feeAssetId": null, "timestamp": 1657106557457, "version": 2, "chainId": 84, "sender": "3MyZr42eC2kca59w82tafyemrC7V2b97yxN", "senderPublicKey": "4gLjFBxeVDJ31pmQaSSAuf5ZiLHzuSGQP6Vk6EHepAiy", "proofs": [ "3uNpMk3LgUgtitZpCk4hkvdy2g2NzenUr6TZpci8nJxMULRKKmiihdjbDYCPrT3kRzP9W3JtXZQADcZmpdK4dJqv" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIIAQAAAAAAAAABAAAAAWkBAAAAGmluc2VydEludG9Tb3J0ZWRMaW5rZWRMaXN0AAAAAgAAAA1zb3J0ZWRMaXN0U3RyAAAACG5ld0VudHJ5BAAAAAhpZHhBcnJheQkABEwAAAACAAAAAAAAAAAACQAETAAAAAIAAAAAAAAAAAEJAARMAAAAAgAAAAAAAAAAAgkABEwAAAACAAAAAAAAAAADCQAETAAAAAIAAAAAAAAAAAQJAARMAAAAAgAAAAAAAAAABQkABEwAAAACAAAAAAAAAAAGCQAETAAAAAIAAAAAAAAAAAcJAARMAAAAAgAAAAAAAAAACAkABEwAAAACAAAAAAAAAAAJCQAETAAAAAIAAAAAAAAAAAoJAARMAAAAAgAAAAAAAAAACwkABEwAAAACAAAAAAAAAAAMCQAETAAAAAIAAAAAAAAAAA0JAARMAAAAAgAAAAAAAAAADgkABEwAAAACAAAAAAAAAAAPCQAETAAAAAIAAAAAAAAAABAJAARMAAAAAgAAAAAAAAAAEQkABEwAAAACAAAAAAAAAAASCQAETAAAAAIAAAAAAAAAABMFAAAAA25pbAQAAAAKc29ydGVkTGlzdAkAB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AAAACwAAAAAAAAAADAAAAAAAAAAADQAAAAAAAAAADgAAAAAAAAAADwAAAAAAAAAAEAAAAAAAAAAAEQAAAAAAAAAAEgAAAAAAAAAAEwAAAAAAAAAAFAkABRQAAAACBQAAAANuaWwFAAAAEm1vZGlmaWVkU29ydGVkTGlzdAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5wmnbtA==", "height": 2127757, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EmEc73AeJFuth5FRNU8rjDQgfVyfbwJvPpiu6wCh6ENn Next: 9qks43qcrstMuzeX9PpGFHHDCURxQTFWpUx43vC5yHbR Diff:
OldNewDifferences
2323 else $Tuple2((newSortedList :+ val), true)
2424 else if ((newEntry >= parseIntValue(val)))
2525 then $Tuple2((newSortedList :+ val), false)
26- else $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
26+ else if ((tupleResult._2 == false))
27+ then $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
28+ else $Tuple2((newSortedList :+ val), true)
2729 }
2830
2931 let modifiedSortedList = {
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 {
1313 func internalInsert (tupleResult,idx) = if ((idx >= size(sortedList)))
1414 then tupleResult
1515 else {
1616 let val = sortedList[idx]
1717 let newSortedList = tupleResult._1
1818 if (((idx + 1) == size(sortedList)))
1919 then if ((tupleResult._2 == false))
2020 then if ((newEntry >= parseIntValue(val)))
2121 then $Tuple2(((newSortedList :+ val) :+ toString(newEntry)), true)
2222 else $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
2323 else $Tuple2((newSortedList :+ val), true)
2424 else if ((newEntry >= parseIntValue(val)))
2525 then $Tuple2((newSortedList :+ val), false)
26- else $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
26+ else if ((tupleResult._2 == false))
27+ then $Tuple2(((newSortedList :+ toString(newEntry)) :+ val), true)
28+ else $Tuple2((newSortedList :+ val), true)
2729 }
2830
2931 let modifiedSortedList = {
3032 let $l = idxArray
3133 let $s = size($l)
3234 let $acc0 = $Tuple2(nil, false)
3335 func $f0_1 ($a,$i) = if (($i >= $s))
3436 then $a
3537 else internalInsert($a, $l[$i])
3638
3739 func $f0_2 ($a,$i) = if (($i >= $s))
3840 then $a
3941 else throw("List size exceeds 20")
4042
4143 $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)
4244 }
4345 $Tuple2(nil, modifiedSortedList)
4446 }
4547 }
4648
4749
4850 @Verifier(tx)
4951 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5052

github/deemru/w8io/fabc49c 
28.37 ms