tx · 7f9CeLAdb1a9SLo3Ses7G6X18cGC6eSkBquRAFSti3SQ

3N9wvyiMoQ3xicrCy26L1CckCqsv5ih8Wk3:  -0.01000000 Waves

2023.09.08 18:24 [2746582] smart account 3N9wvyiMoQ3xicrCy26L1CckCqsv5ih8Wk3 > SELF 0.00000000 Waves

{ "type": 13, "id": "7f9CeLAdb1a9SLo3Ses7G6X18cGC6eSkBquRAFSti3SQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1694186685434, "version": 2, "chainId": 84, "sender": "3N9wvyiMoQ3xicrCy26L1CckCqsv5ih8Wk3", "senderPublicKey": "CDzcKBFXDv8K7VH1GnCEGWuPDss4zWuxx7PwqQWZFVTx", "proofs": [ "3PBkFp2i5MRTJAwGfGAhpid4Hpkfd533C6GXrjDQBVLLtcBSWvUm8bAo7CejBpL6iGddVXaQ5yac3XPU8kV1r2eY" ], "script": "base64:AAIFAAAAAAAAAA8IAhIECgIYARIFCgMICB8AAAAEAAAAAAx2ZXJpZmllcnNLZXkCAAAACXZlcmlmaWVycwAAAAAUdmVyaWZpZXJzUmVxdWlyZWRLZXkCAAAAEXZlcmlmaWVyc1JlcXVpcmVkAAAAABBpc0NvbnN0cnVjdGVkS2V5AgAAAA1pc0NvbnN0cnVjdGVkAAAAAANTRVACAAAAAl9fAAAAAgAAAAFpAQAAAAtjb25zdHJ1Y3RvcgAAAAIAAAAJdmVyaWZpZXJzAAAAEXJlcXVpcmVkVmVyaWZpZXJzAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQgAAAAAQUAAAAQaXNDb25zdHJ1Y3RlZEtleQkAAAIAAAABAgAAACNDb25zdHJ1Y3RvciBjYW4gYmUgY2FsbGVkIGp1c3Qgb25jZQMJAABmAAAAAgkAAZAAAAABBQAAAAl2ZXJpZmllcnMAAAAAAAAAAAgJAAACAAAAAQIAAAAZTWF4IHZlcmlmaWVycyBudW1iZXIgaXMgOAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgUAAAAQ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 2746582, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let verifiersKey = "verifiers"
5+
6+let verifiersRequiredKey = "verifiersRequired"
7+
8+let isConstructedKey = "isConstructed"
9+
10+let SEP = "__"
11+
12+@Callable(i)
13+func constructor (verifiers,requiredVerifiers) = if (isDefined(getBoolean(isConstructedKey)))
14+ then throw("Constructor can be called just once")
15+ else if ((size(verifiers) > 8))
16+ then throw("Max verifiers number is 8")
17+ else [BooleanEntry(isConstructedKey, true), StringEntry(verifiersKey, makeString(verifiers, SEP)), IntegerEntry(verifiersRequiredKey, requiredVerifiers)]
18+
19+
20+
21+@Callable(i)
22+func call (address,function,params) = if ((i.caller != this))
23+ then throw("Only this contract can call itself")
24+ else {
25+ let result = invoke(Address(fromBase58String(address)), function, params, i.payments)
26+ if ((result == result))
27+ then nil
28+ else throw("Strict value is not equal to itself.")
29+ }
30+
31+
32+@Verifier(tx)
33+func verify () = {
34+ let verifiers = split(getStringValue(verifiersKey), SEP)
35+ let verifiersRequired = getIntegerValue(verifiersRequiredKey)
36+ func sum (accum,next) = {
37+ let validatedProofsCount = accum._1
38+ let currentProofsIndex = accum._2
39+ let isVerified = if (sigVerify(tx.bodyBytes, tx.proofs[currentProofsIndex], fromBase58String(next)))
40+ then 1
41+ else 0
42+ $Tuple2((validatedProofsCount + isVerified), (currentProofsIndex + 1))
43+ }
44+
45+ let validationData = {
46+ let $l = verifiers
47+ let $s = size($l)
48+ let $acc0 = $Tuple2(0, 0)
49+ func $f0_1 ($a,$i) = if (($i >= $s))
50+ then $a
51+ else sum($a, $l[$i])
52+
53+ func $f0_2 ($a,$i) = if (($i >= $s))
54+ then $a
55+ else throw("List size exceeds 8")
56+
57+ $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)
58+ }
59+ (validationData._1 >= verifiersRequired)
60+ }
61+

github/deemru/w8io/169f3d6 
24.20 ms