1 | | - | {-# STDLIB_VERSION 6 #-} |
---|
2 | | - | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | | - | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | |
---|
5 | | - | |
---|
6 | | - | |
---|
7 | | - | @Verifier(tx) |
---|
8 | | - | func verify () = { |
---|
9 | | - | let firstUser = base58'E4EZBBRm4Fa9zqhaxoNzN7VHABT4GzRZtTW88Tok9vzN' |
---|
10 | | - | let secondUser = base58'HL5S4v7kbnayKNTtyDHUmLWtBK3EoQCQf9EzorEVR6xk' |
---|
11 | | - | let thirdUser = base58'CApmwarLiKkBCwccSbvv8gVEYpG7r6RMVoQ3U8rHkzCM' |
---|
12 | | - | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) |
---|
13 | | - | then 1 |
---|
14 | | - | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) |
---|
15 | | - | then 1 |
---|
16 | | - | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) |
---|
17 | | - | then 1 |
---|
18 | | - | else 0 |
---|
19 | | - | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) |
---|
20 | | - | then 1 |
---|
21 | | - | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) |
---|
22 | | - | then 1 |
---|
23 | | - | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) |
---|
24 | | - | then 1 |
---|
25 | | - | else 0 |
---|
26 | | - | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) |
---|
27 | | - | then 1 |
---|
28 | | - | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) |
---|
29 | | - | then 1 |
---|
30 | | - | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) |
---|
31 | | - | then 1 |
---|
32 | | - | else 0 |
---|
33 | | - | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) |
---|
34 | | - | match tx { |
---|
35 | | - | case _ => |
---|
36 | | - | (signaturesCount >= 2) |
---|
37 | | - | } |
---|
38 | | - | } |
---|
39 | | - | |
---|
| 1 | + | {-# STDLIB_VERSION 5 #-} |
---|
| 2 | + | {-# CONTENT_TYPE EXPRESSION #-} |
---|
| 3 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|