1 | | - | {-# STDLIB_VERSION 5 #-} |
---|
2 | | - | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | | - | let masterAccAdress = base58'3PJ5m5pQz84rXJy5Z5mixSaCQmkGHhGKH3k' |
---|
4 | | - | let masterAccPubKey = base58'45W6DExkKmj9C5FHSLv1CLa2y5V4WYgK5x58s93qYAHA' |
---|
5 | | - | let poolsOracleAdrress = base58'3PAtABQNZzoM4KdfBb7J73UiVUAbPQ8opxy' |
---|
6 | | - | func isPuzzleSwapPool (poolAddress) = match getString(Address(poolsOracleAdrress), ("pool_" + toString(poolAddress))) { |
---|
7 | | - | case s: String => |
---|
8 | | - | (size(s) > 0) |
---|
9 | | - | case _ => |
---|
10 | | - | false |
---|
11 | | - | } |
---|
12 | | - | |
---|
13 | | - | match tx { |
---|
14 | | - | case t: TransferTransaction => |
---|
15 | | - | if (sigVerify(tx.bodyBytes, tx.proofs[0], masterAccPubKey)) |
---|
16 | | - | then true |
---|
17 | | - | else if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) |
---|
18 | | - | then (t.recipient == Address(masterAccAdress)) |
---|
19 | | - | else false |
---|
20 | | - | case i: InvokeScriptTransaction => |
---|
21 | | - | if (sigVerify(tx.bodyBytes, tx.proofs[0], masterAccPubKey)) |
---|
22 | | - | then true |
---|
23 | | - | else if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) |
---|
24 | | - | then isPuzzleSwapPool(addressFromRecipient(i.dApp)) |
---|
25 | | - | else false |
---|
26 | | - | case _ => |
---|
27 | | - | sigVerify(tx.bodyBytes, tx.proofs[0], masterAccPubKey) |
---|
28 | | - | } |
---|
| 1 | + | # no script |
---|