tx · BHeZiaAsoundZH2WjKZMToz6MjgAeGvX13Q3HT4R7tZL 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh: -0.01000000 Waves 2023.04.18 09:39 [2539637] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves
{ "type": 13, "id": "BHeZiaAsoundZH2WjKZMToz6MjgAeGvX13Q3HT4R7tZL", "fee": 1000000, "feeAssetId": null, "timestamp": 1681799988994, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "5v6F85uNmtYEWpLjMEinhkdkum9ykCDn6RBkiMkgHzup2vSvvGk1Xkz65yFbUYk8LLFA5VHWEs6Bw5CXpSKedvje" ], "script": "base64:BgICCAIJAANTRVACAl9fABBjb250cmFjdEZpbGVuYW1lAgl0ZXN0LnJpZGUBEGtleVB1YmxpY0tleUxpc3QACQC5CQIJAMwIAgICJXMJAMwIAgIVbXVsdGlzaWdQdWJsaWNLZXlMaXN0BQNuaWwFA1NFUAEIdGhyb3dFcnIBAXMJAAIBCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBHGdldE11bHRpc2lnUHViS2V5c0xpc3RPclVuaXQABBJyYXdNdWx0aXNpZ1B1YktleXMJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBEGtleVB1YmxpY0tleUxpc3QAAgAJALUJAgUScmF3TXVsdGlzaWdQdWJLZXlzBQNTRVABD2NvbXBhcmVGdW5jdGlvbgIBYQFiAwkAAAIFAWEFAWIAAQAAAQ1jb21wYXJlSGVscGVyAgNsc3QBYgQJJHQwNTY5NTk1BQNsc3QEBnJlc3VsdAgFCSR0MDU2OTU5NQJfMQQGZXhwZWN0CAUJJHQwNTY5NTk1Al8yCQCUCgIJAM0IAgUGcmVzdWx0CQEPY29tcGFyZUZ1bmN0aW9uAgUGZXhwZWN0BQFiBQFiAQdjb21wYXJlAgRsaXN0AWEKAAIkbAUEbGlzdAoAAiRzCQCQAwEFAiRsCgAFJGFjYzAJAJQKAgUDbmlsBQFhCgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQ1jb21wYXJlSGVscGVyAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhRMaXN0IHNpemUgZXhjZWVkcyAxMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKAQR0ZXN0AAQFbGlzdDEJAMwIAgIBYQkAzAgCAgFjCQDMCAICAWUFA25pbAQFbGlzdDIJAMwIAgIBYQkAzAgCAgFiCQDMCAICAWMJAMwIAgIBZAkAzAgCAgFlBQNuaWwJAQdjb21wYXJlAgUFbGlzdDICAWMAACY6Rbk=", "height": 2539637, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4edS2hBsJFvTXtgDGu519XpLiQyNFDuSUfhhHeMGQ3ah Next: 7M24oUoeMNg9KKHibv4xKdJZbGZmm15gCMx8joFfPYYc Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let SEP = "__" | |
5 | + | ||
6 | + | let contractFilename = "test.ride" | |
7 | + | ||
8 | + | func keyPublicKeyList () = makeString(["%s", "multisigPublicKeyList"], SEP) | |
4 | 9 | ||
5 | 10 | ||
11 | + | func throwErr (s) = throw(((contractFilename + ": ") + s)) | |
6 | 12 | ||
7 | - | @Verifier(tx) | |
8 | - | func verify () = match tx { | |
9 | - | case o: Order => | |
10 | - | getBooleanValue(this, "foo") | |
11 | - | case _ => | |
12 | - | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
13 | - | } | |
13 | + | ||
14 | + | func getMultisigPubKeysListOrUnit () = { | |
15 | + | let rawMultisigPubKeys = valueOrElse(getString(this, keyPublicKeyList()), "") | |
16 | + | split(rawMultisigPubKeys, SEP) | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | func compareFunction (a,b) = if ((a == b)) | |
21 | + | then 1 | |
22 | + | else 0 | |
23 | + | ||
24 | + | ||
25 | + | func compareHelper (lst,b) = { | |
26 | + | let $t0569595 = lst | |
27 | + | let result = $t0569595._1 | |
28 | + | let expect = $t0569595._2 | |
29 | + | $Tuple2((result :+ compareFunction(expect, b)), b) | |
30 | + | } | |
31 | + | ||
32 | + | ||
33 | + | func compare (list,a) = { | |
34 | + | let $l = list | |
35 | + | let $s = size($l) | |
36 | + | let $acc0 = $Tuple2(nil, a) | |
37 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
38 | + | then $a | |
39 | + | else compareHelper($a, $l[$i]) | |
40 | + | ||
41 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
42 | + | then $a | |
43 | + | else throw("List size exceeds 10") | |
44 | + | ||
45 | + | $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) | |
46 | + | } | |
47 | + | ||
48 | + | ||
49 | + | func test () = { | |
50 | + | let list1 = ["a", "c", "e"] | |
51 | + | let list2 = ["a", "b", "c", "d", "e"] | |
52 | + | compare(list2, "c") | |
53 | + | } | |
54 | + | ||
55 | + | ||
14 | 56 |
github/deemru/w8io/169f3d6 33.78 ms ◑