1 | | - | {-# STDLIB_VERSION 6 #-} |
---|
2 | | - | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | | - | let subwarL2_1 = base58'HpeKQu8xawfaxbbTSPNMNqVvWM9xhebUcemDK5REzG2j' |
---|
4 | | - | let subwarL2_2 = base58'BEVjN4AXKQ2Yw7KS1wiL5DMGg5V9cDniNH7dK2v5d7Ek' |
---|
5 | | - | let targetDapp1 = value(addressFromString("3Msx4Aq69zWUKy4d1wyKnQ4ofzEDAfv5Ngf")) |
---|
6 | | - | let targetDapp2 = value(addressFromString("3PJVm7xLPabmYohbnvdgGDYHMwnZxF2x18m")) |
---|
7 | | - | let signed1 = if (sigVerify(tx.bodyBytes, tx.proofs[0], subwarL2_1)) |
---|
8 | | - | then 1 |
---|
9 | | - | else 0 |
---|
10 | | - | let signed2 = if (sigVerify(tx.bodyBytes, tx.proofs[1], subwarL2_2)) |
---|
11 | | - | then 1 |
---|
12 | | - | else 0 |
---|
13 | | - | let isMultiSignValid = ((signed1 + signed2) == 2) |
---|
14 | | - | match tx { |
---|
15 | | - | case t: InvokeScriptTransaction => |
---|
16 | | - | let bypassCondition = if ((t.dApp == targetDapp1)) |
---|
17 | | - | then { |
---|
18 | | - | let bypassFunctions1 = ["extendMainChain", "appendBlock", "startAltChain", "extendAltChain"] |
---|
19 | | - | (indexOf(bypassFunctions1, t.function) != -1) |
---|
20 | | - | } |
---|
21 | | - | else if ((t.dApp == targetDapp2)) |
---|
22 | | - | then (t.function == "claimLP") |
---|
23 | | - | else false |
---|
24 | | - | if (isMultiSignValid) |
---|
25 | | - | then true |
---|
26 | | - | else bypassCondition |
---|
27 | | - | case _ => |
---|
28 | | - | isMultiSignValid |
---|
29 | | - | } |
---|
| 1 | + | # no script |
---|