tx · GmsGtDifMd15rEskJhdQWp4mTqDDskvm5ePsqJaeTjP6 3MtEFgs9JgvadLTPHxmNTLoYdWeb2q6S8NB: -0.01000000 Waves 2023.01.09 16:25 [2397460] smart account 3MtEFgs9JgvadLTPHxmNTLoYdWeb2q6S8NB > SELF 0.00000000 Waves
{ "type": 13, "id": "GmsGtDifMd15rEskJhdQWp4mTqDDskvm5ePsqJaeTjP6", "fee": 1000000, "feeAssetId": null, "timestamp": 1673270718797, "version": 2, "chainId": 84, "sender": "3MtEFgs9JgvadLTPHxmNTLoYdWeb2q6S8NB", "senderPublicKey": "1TPcHyMLh4VbFSScV3oHKxxgdSwY4XC6TaGyrqhFrhd", "proofs": [ "52TPDC771CCD5wrheo5pFEhBca7RnCYguAzLiKg3GAmB6jtGeGPKMCARNPR52cjgGazBevGdYxcHBhaLhu7aLpU8" ], "script": "base64:BgIGCAISABIACAAHbWVzc2FnZQkBEUBleHRyTmF0aXZlKDEwNTIpAgUEdGhpcwIHbWVzc2FnZQADc2lnCQERQGV4dHJOYXRpdmUoMTA1MikCBQR0aGlzAgNzaWcAA3B1YgkBEUBleHRyTmF0aXZlKDEwNTIpAgUEdGhpcwIDcHViAAZ2ZXJpZnkJAPQDAwUHbWVzc2FnZQUDc2lnBQNwdWIAA2FycgkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFCQDMCAIABgkAzAgCAAcJAMwIAgAIBQNuaWwBDGlubmVyUG93RnVuYwIDYWNjBG5leHQDBQZ2ZXJpZnkEA2JpZwkAtgIBBQRuZXh0CQBkAgkAZAIFA2FjYwkAoAMBCQB2BgUDYmlnAAEFA2JpZwABAAEFBERPV04JAKADAQkAdgYFA2JpZwACBQNiaWcAAgACBQRET1dOBQNuaWwBB3Bvd0Z1bmMCA2FjYwRuZXh0AwUGdmVyaWZ5BANiaWcJALYCAQUEbmV4dAkAZAIFA2FjYwoAAiRsBQNhcnIKAAIkcwkAkAMBBQIkbAoABSRhY2MwBQRuZXh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iRzBQIkYQkBB3Bvd0Z1bmMCBQIkYQkAkQMCBQIkbAUCJGkKAQUkZjBfMgICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkAAgECE0xpc3Qgc2l6ZSBleGNlZWRzIDgJAQUkZjBfMgIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMABAAFAAYABwAICQCUCgIFA25pbAUBcAD9QlDg", "height": 2397460, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 85mSqZvhTLrxbkucbDfQUNhZQtwLmMPwoJcJ3UYGatiF Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let message = getBinaryValue(this, "message") | |
5 | + | ||
6 | + | let sig = getBinaryValue(this, "sig") | |
7 | + | ||
8 | + | let pub = getBinaryValue(this, "pub") | |
9 | + | ||
10 | + | let verify = sigVerify(message, sig, pub) | |
11 | + | ||
12 | + | let arr = [1, 2, 3, 4, 5, 6, 7, 8] | |
13 | + | ||
14 | + | func innerPowFunc (acc,next) = if (verify) | |
15 | + | then { | |
16 | + | let big = toBigInt(next) | |
17 | + | ((acc + toInt(pow(big, 1, big, 1, 1, DOWN))) + toInt(pow(big, 2, big, 2, 2, DOWN))) | |
18 | + | } | |
19 | + | else nil | |
20 | + | ||
21 | + | ||
22 | + | func powFunc (acc,next) = if (verify) | |
23 | + | then { | |
24 | + | let big = toBigInt(next) | |
25 | + | (acc + { | |
26 | + | let $l = arr | |
27 | + | let $s = size($l) | |
28 | + | let $acc0 = next | |
29 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
30 | + | then $a | |
31 | + | else innerPowFunc($a, $l[$i]) | |
32 | + | ||
33 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
34 | + | then $a | |
35 | + | else throw("List size exceeds 8") | |
36 | + | ||
37 | + | $f0_2($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) | |
38 | + | }) | |
39 | + | } | |
40 | + | else nil | |
41 | + | ||
42 | + | ||
43 | + | func noncall () = { | |
44 | + | let p = { | |
45 | + | let $l = arr | |
46 | + | let $s = size($l) | |
47 | + | let $acc0 = 1 | |
48 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
49 | + | then $a | |
50 | + | else powFunc($a, $l[$i]) | |
51 | + | ||
52 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
53 | + | then $a | |
54 | + | else throw("List size exceeds 8") | |
55 | + | ||
56 | + | $f0_2($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) | |
57 | + | } | |
58 | + | $Tuple2(nil, p) | |
59 | + | } | |
60 | + | ||
61 | + | ||
62 | + | @Callable(i) | |
63 | + | func prepare () = [BinaryEntry("message", base58'emsY'), BinaryEntry("pub", base58'HnU9jfhpMcQNaG5yQ46eR43RnkWKGxerw2zVrbpnbGof'), BinaryEntry("sig", base58'4uXfw7162zaopAkTNa7eo6YK2mJsTiHGJL3dCtRRH63z1nrdoHBHyhbvrfZovkxf2jKsi2vPsaP2XykfZmUiwPeg')] | |
64 | + | ||
4 | 65 | ||
5 | 66 | ||
6 | 67 | @Callable(i) | |
7 | 68 | func call () = { | |
8 | - | let asset = Issue("Asset", "", 1, 0, true, unit, 0) | |
9 | - | let assetId = calculateAssetId(asset) | |
10 | - | [BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str")] | |
69 | + | let p = { | |
70 | + | let $l = arr | |
71 | + | let $s = size($l) | |
72 | + | let $acc0 = 1 | |
73 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
74 | + | then $a | |
75 | + | else powFunc($a, $l[$i]) | |
76 | + | ||
77 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
78 | + | then $a | |
79 | + | else throw("List size exceeds 8") | |
80 | + | ||
81 | + | $f0_2($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) | |
82 | + | } | |
83 | + | $Tuple2(nil, p) | |
11 | 84 | } | |
12 | 85 | ||
13 | - | ||
14 | - | @Verifier(tx) | |
15 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
16 | 86 |
github/deemru/w8io/169f3d6 22.11 ms ◑