tx · 9chq7G7oUaP1rdhCwCd7VLmJTibXBnmwQpQHd6qVWSNz

3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh:  -0.01000000 Waves

2023.04.18 10:03 [2539667] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves

{ "type": 13, "id": "9chq7G7oUaP1rdhCwCd7VLmJTibXBnmwQpQHd6qVWSNz", "fee": 1000000, "feeAssetId": null, "timestamp": 1681801475813, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "4ScVgJSTqJhzpbsBAzxu7fusC231n5tLjkryWeyD8iBzDCpRi1U2J19n7kjoLXHjvYCYeWF1usSQKbtm1tFvFUZ4" ], "script": "base64:BgICCAILAANTRVACAl9fABBjb250cmFjdEZpbGVuYW1lAgl0ZXN0LnJpZGUBEGtleVB1YmxpY0tleUxpc3QACQC5CQIJAMwIAgICJXMJAMwIAgIVbXVsdGlzaWdQdWJsaWNLZXlMaXN0BQNuaWwFA1NFUAEIdGhyb3dFcnIBAXMJAAIBCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBHGdldE11bHRpc2lnUHViS2V5c0xpc3RPclVuaXQABBJyYXdNdWx0aXNpZ1B1YktleXMJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBEGtleVB1YmxpY0tleUxpc3QAAgAJALUJAgUScmF3TXVsdGlzaWdQdWJLZXlzBQNTRVABD2NvbXBhcmVGdW5jdGlvbgIBYQFiAwkAAAIFAWEFAWIAAQAAAQ1jb21wYXJlSGVscGVyAgNsc3QBYQQJJHQwNTY5NTk1BQNsc3QEBnJlc3VsdAgFCSR0MDU2OTU5NQJfMQQGZXhwZWN0CAUJJHQwNTY5NTk1Al8yCQCUCgIJAM0IAgUGcmVzdWx0CQEPY29tcGF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25pbAQLY29tcGFyZUxpc3QICQEHY29tcGFyZQIFBWxpc3QyBQFhAl8xCQEHc3VtTGlzdAEFC2NvbXBhcmVMaXN0AAB2AXoz", "height": 2539667, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7M24oUoeMNg9KKHibv4xKdJZbGZmm15gCMx8joFfPYYc Next: ASRuKXHEELxqv6NEv5318S2KbhNsY8BhHNCKEVHKrVNp Diff:
OldNewDifferences
4646 }
4747
4848
49+func accum (sum,val) = (sum + val)
50+
51+
52+func sumList (list) = {
53+ let $l = list
54+ let $s = size($l)
55+ let $acc0 = 0
56+ func $f0_1 ($a,$i) = if (($i >= $s))
57+ then $a
58+ else accum($a, $l[$i])
59+
60+ func $f0_2 ($a,$i) = if (($i >= $s))
61+ then $a
62+ else throw("List size exceeds 10")
63+
64+ $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)
65+ }
66+
67+
4968 func test (a) = {
5069 let list1 = ["a", "c", "e"]
51- let list2 = ["a", "b", "c", "d", "e"]
52- compare(list2, a)
70+ let list2 = ["a", "b", "c", "d", "e", "c", "c", "e"]
71+ let compareList = compare(list2, a)._1
72+ sumList(compareList)
5373 }
5474
5575
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let contractFilename = "test.ride"
77
88 func keyPublicKeyList () = makeString(["%s", "multisigPublicKeyList"], SEP)
99
1010
1111 func throwErr (s) = throw(((contractFilename + ": ") + s))
1212
1313
1414 func getMultisigPubKeysListOrUnit () = {
1515 let rawMultisigPubKeys = valueOrElse(getString(this, keyPublicKeyList()), "")
1616 split(rawMultisigPubKeys, SEP)
1717 }
1818
1919
2020 func compareFunction (a,b) = if ((a == b))
2121 then 1
2222 else 0
2323
2424
2525 func compareHelper (lst,a) = {
2626 let $t0569595 = lst
2727 let result = $t0569595._1
2828 let expect = $t0569595._2
2929 $Tuple2((result :+ compareFunction(expect, a)), a)
3030 }
3131
3232
3333 func compare (list,a) = {
3434 let $l = list
3535 let $s = size($l)
3636 let $acc0 = $Tuple2(nil, a)
3737 func $f0_1 ($a,$i) = if (($i >= $s))
3838 then $a
3939 else compareHelper($a, $l[$i])
4040
4141 func $f0_2 ($a,$i) = if (($i >= $s))
4242 then $a
4343 else throw("List size exceeds 10")
4444
4545 $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)
4646 }
4747
4848
49+func accum (sum,val) = (sum + val)
50+
51+
52+func sumList (list) = {
53+ let $l = list
54+ let $s = size($l)
55+ let $acc0 = 0
56+ func $f0_1 ($a,$i) = if (($i >= $s))
57+ then $a
58+ else accum($a, $l[$i])
59+
60+ func $f0_2 ($a,$i) = if (($i >= $s))
61+ then $a
62+ else throw("List size exceeds 10")
63+
64+ $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)
65+ }
66+
67+
4968 func test (a) = {
5069 let list1 = ["a", "c", "e"]
51- let list2 = ["a", "b", "c", "d", "e"]
52- compare(list2, a)
70+ let list2 = ["a", "b", "c", "d", "e", "c", "c", "e"]
71+ let compareList = compare(list2, a)._1
72+ sumList(compareList)
5373 }
5474
5575
5676

github/deemru/w8io/026f985 
31.02 ms