1 | | - | {-# STDLIB_VERSION 2 #-} |
---|
2 | | - | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | | - | let pKey0All = base58'8PUyJHGVRUxhY118c4H5isGCGLYgRBmcSzNYooDAqwh' |
---|
4 | | - | let pKey1All = base58'7c4bZ4JEe6e35zhE114V8UwfDtANe3WTeZ8h2bBDgAJM' |
---|
5 | | - | let pKey0ReissueBurn = base58'6NLLTUr9arNqo9qEtdCQeo1Y5osR2oqawcGatzzZ4BzC' |
---|
6 | | - | let pKey1ReissueBurn = base58'EFV72FQGDPAhmxJ7oEXCzi9LscwNcsku31X8brk6qtLF' |
---|
7 | | - | match tx { |
---|
8 | | - | case tx: SetScriptTransaction => |
---|
9 | | - | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
10 | | - | case tx: ReissueTransaction => |
---|
11 | | - | let pKey0Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], pKey0ReissueBurn)) |
---|
12 | | - | then 1 |
---|
13 | | - | else 0 |
---|
14 | | - | let pKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[3], pKey1ReissueBurn)) |
---|
15 | | - | then 1 |
---|
16 | | - | else 0 |
---|
17 | | - | ((pKey0Signed + pKey1Signed) >= 2) |
---|
18 | | - | case tx: BurnTransaction => |
---|
19 | | - | let pKey0Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], pKey0ReissueBurn)) |
---|
20 | | - | then 1 |
---|
21 | | - | else 0 |
---|
22 | | - | let pKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[3], pKey1ReissueBurn)) |
---|
23 | | - | then 1 |
---|
24 | | - | else 0 |
---|
25 | | - | ((pKey0Signed + pKey1Signed) >= 2) |
---|
26 | | - | case _ => |
---|
27 | | - | let pKey0Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], pKey0All)) |
---|
28 | | - | then 1 |
---|
29 | | - | else 0 |
---|
30 | | - | let pKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[3], pKey1All)) |
---|
31 | | - | then 1 |
---|
32 | | - | else 0 |
---|
33 | | - | ((pKey0Signed + pKey1Signed) >= 2) |
---|
34 | | - | } |
---|
| 1 | + | # no script |
---|