tx · 3Ccit2mVkhPqhHME6ko2beUCHby8kaimUVNHFjCDZJnK

3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh:  -0.01000000 Waves

2023.04.18 11:30 [2539755] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves

{ "type": 13, "id": "3Ccit2mVkhPqhHME6ko2beUCHby8kaimUVNHFjCDZJnK", "fee": 1000000, "feeAssetId": null, "timestamp": 1681806648457, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "4YWDsgkuWZB2tKbJyEfCA3QZidNhUGjMEy77C54qceJ1Q537TdgHcgt9bi8GTzdQNALb5a32yC5PjxTPqU5U15oU" ], "script": "base64:BgICCAIPAANTRVACAl9fABBjb250cmFjdEZpbGVuYW1lAgl0ZXN0LnJpZGUBEGtleVB1YmxpY0tleUxpc3QACQC5CQIJAMwIAgICJXMJAMwIAgIVbXVsdGlzaWdQdWJsaWNLZXlMaXN0BQNuaWwFA1NFUAEIdGhyb3dFcnIBAXMJAAIBCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBHGdldE11bHRpc2lnUHViS2V5c0xpc3RPclVuaXQABBJyYXdNdWx0aXNpZ1B1YktleXMJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBEGtleVB1YmxpY0tleUxpc3QAAgAJALUJAgUScmF3TXVsdGlzaWdQdWJLZXlzBQNTRVABDXZhbGlkYXRlUHJvb2YDCXB1YmxpY0tleQVwcm9vZglib2R5Qnl0ZXMDCQAAAgUJcHVibGljS2V5BQVwcm9vZgABAAABDWNvbXBhcmVIZWxwZXICA2xzdAVwcm9vZgQJJHQwNjQ2Njg3BQNsc3QEB3Jlc3VsdHMIBQkkdDA2NDY2ODcCXzEECXB1YmxpY0tleQgFCSR0MDY0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CQCVCgMFA25pbAUKcHJvb2ZzTGlzdAUJYm9keUJ5dGVzCgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJARFjb21wYXJlTGlzdEhlbHBlcgIFAiRhCQCRAwIFAiRsBQIkaQoBBSRmMF8yAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQACAQIUTGlzdCBzaXplIGV4Y2VlZHMgMTAJAQUkZjBfMgIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMABAAFAAYABwAIAAkACgQEbm9ybQkBCW5vcm1pbGl6ZQEIBQdyYXdMaXN0Al8xBQRub3JtAQR0ZXN0AAQKcHJvb2ZzTGlzdAkAzAgCAQJ4VwkAzAgCAQMbQ78FA25pbAQOcHVibGljS2V5c0xpc3QJAMwIAgECeFcJAMwIAgECeFcJAMwIAgEDG0O/CQDMCAIBBAYtWU8JAMwIAgEDG0O/BQNuaWwECWJvZHlCeXRlcwEDG0O/BAFiCQEPdmFsaWRQcm9vZkNvdW50AwUOcHVibGljS2V5c0xpc3QFCnByb29mc0xpc3QFCWJvZHlCeXRlcwkAlAoCCQEHc3VtTGlzdAEFAWIFAWIAAKCljd8=", "height": 2539755, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: qvFXR9FbxCFRfpfaaETcqyPSV5TC78F9L9skvACKDk9 Next: g9EppYougCkRqymBuioic1trHhoW1t4oyaXE6KjtoTw Diff:
OldNewDifferences
117117
118118
119119 func test () = {
120- let publicKeysList = [base58'AAA', base58'AAAA']
121- let proofsList = [base58'AAA', base58'AAA', base58'AAAA', base58'AAAAA', base58'AAAA']
120+ let proofsList = [base58'AAA', base58'AAAA']
121+ let publicKeysList = [base58'AAA', base58'AAA', base58'AAAA', base58'AAAAA', base58'AAAA']
122122 let bodyBytes = base58'AAAA'
123123 let b = validProofCount(publicKeysList, proofsList, bodyBytes)
124124 $Tuple2(sumList(b), b)
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 validateProof (publicKey,proof,bodyBytes) = if ((publicKey == proof))
2121 then 1
2222 else 0
2323
2424
2525 func compareHelper (lst,proof) = {
2626 let $t0646687 = lst
2727 let results = $t0646687._1
2828 let publicKey = $t0646687._2
2929 let bodyBytes = $t0646687._3
3030 $Tuple3((results :+ validateProof(publicKey, proof, bodyBytes)), publicKey, bodyBytes)
3131 }
3232
3333
3434 func compare (proofsList,publicKey,bodyBytes) = {
3535 let $l = proofsList
3636 let $s = size($l)
3737 let $acc0 = $Tuple3(nil, publicKey, bodyBytes)
3838 func $f0_1 ($a,$i) = if (($i >= $s))
3939 then $a
4040 else compareHelper($a, $l[$i])
4141
4242 func $f0_2 ($a,$i) = if (($i >= $s))
4343 then $a
4444 else throw("List size exceeds 10")
4545
4646 $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)
4747 }
4848
4949
5050 func accum (sum,val) = (sum + val)
5151
5252
5353 func sumList (list) = {
5454 let $l = list
5555 let $s = size($l)
5656 let $acc0 = 0
5757 func $f0_1 ($a,$i) = if (($i >= $s))
5858 then $a
5959 else accum($a, $l[$i])
6060
6161 func $f0_2 ($a,$i) = if (($i >= $s))
6262 then $a
6363 else throw("List size exceeds 10")
6464
6565 $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)
6666 }
6767
6868
6969 func compareListHelper (proofs,publicKey) = {
7070 let $t011511196 = proofs
7171 let results = $t011511196._1
7272 let proofsList = $t011511196._2
7373 let bodyBytes = $t011511196._3
7474 let compareList = compare(proofsList, publicKey, bodyBytes)._1
7575 let sum = sumList(compareList)
7676 $Tuple3((results :+ sum), proofsList, bodyBytes)
7777 }
7878
7979
8080 func normilizeHelper (results,next) = (results :+ min([1, next]))
8181
8282
8383 func normilize (results) = {
8484 let $l = results
8585 let $s = size($l)
8686 let $acc0 = nil
8787 func $f0_1 ($a,$i) = if (($i >= $s))
8888 then $a
8989 else normilizeHelper($a, $l[$i])
9090
9191 func $f0_2 ($a,$i) = if (($i >= $s))
9292 then $a
9393 else throw("List size exceeds 10")
9494
9595 $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)
9696 }
9797
9898
9999 func validProofCount (publicKeysList,proofsList,bodyBytes) = {
100100 let rawList = {
101101 let $l = publicKeysList
102102 let $s = size($l)
103103 let $acc0 = $Tuple3(nil, proofsList, bodyBytes)
104104 func $f0_1 ($a,$i) = if (($i >= $s))
105105 then $a
106106 else compareListHelper($a, $l[$i])
107107
108108 func $f0_2 ($a,$i) = if (($i >= $s))
109109 then $a
110110 else throw("List size exceeds 10")
111111
112112 $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)
113113 }
114114 let norm = normilize(rawList._1)
115115 norm
116116 }
117117
118118
119119 func test () = {
120- let publicKeysList = [base58'AAA', base58'AAAA']
121- let proofsList = [base58'AAA', base58'AAA', base58'AAAA', base58'AAAAA', base58'AAAA']
120+ let proofsList = [base58'AAA', base58'AAAA']
121+ let publicKeysList = [base58'AAA', base58'AAA', base58'AAAA', base58'AAAAA', base58'AAAA']
122122 let bodyBytes = base58'AAAA'
123123 let b = validProofCount(publicKeysList, proofsList, bodyBytes)
124124 $Tuple2(sumList(b), b)
125125 }
126126
127127
128128

github/deemru/w8io/026f985 
27.70 ms