3 | | - | let tbtcIssuerPubKey = base58'3SmEfcH8L6HTopqkkKr8iN1G5Z44sEJdDQqtY6YtXnfZ' |
---|
4 | | - | let tbtcIssuerVerifierPubKey = base58'FDuwuYHXBnTFUPJheVwdF3rmMqusKPb5C297jYv2Qbux' |
---|
5 | | - | let tbtcIssuer2VerifierPubKey = base58'FDuwuYHXBnTFUPJheVwdF3rmMqusKPb5C297jYv2Qbux' |
---|
6 | | - | let tbtcGatewayAddress = addressFromString("3MsXZv9fT9pUtBZbCZ7ogHkhV75gjJgDsrs") |
---|
7 | | - | let tbtcGatewayPubKey = base58'4wKfNrcEQCqhawz5UMkJtXyzdDg83hr5iAWYfynT5ygh' |
---|
8 | | - | let tbtcGatewayVerifierAddress = addressFromString("3MsXZv9fT9pUtBZbCZ7ogHkhV75gjJgDsrs") |
---|
9 | | - | let tbtcGatewayVerifierPubKey = base58'4wKfNrcEQCqhawz5UMkJtXyzdDg83hr5iAWYfynT5ygh' |
---|
10 | | - | let tbtcMatcherAddress = addressFromString("3N6LAgKawp88nVHFmqdY7HfeqrnYspZwE4C") |
---|
11 | | - | match tx { |
---|
12 | | - | case t: ReissueTransaction => |
---|
13 | | - | let signedGateway = if (sigVerify(tx.bodyBytes, tx.proofs[1], tbtcGatewayPubKey)) |
---|
14 | | - | then 1 |
---|
15 | | - | else 0 |
---|
16 | | - | let signedGatewayVerifier = if (sigVerify(tx.bodyBytes, tx.proofs[2], tbtcGatewayVerifierPubKey)) |
---|
17 | | - | then 1 |
---|
18 | | - | else 0 |
---|
19 | | - | ((signedGateway + signedGatewayVerifier) >= 1) |
---|
20 | | - | case t: TransferTransaction => |
---|
21 | | - | if ((t.recipient == tbtcGatewayAddress)) |
---|
22 | | - | then true |
---|
23 | | - | else (t.sender == tbtcGatewayAddress) |
---|
24 | | - | case t: ExchangeTransaction => |
---|
25 | | - | let matcher = extract(tbtcMatcherAddress) |
---|
26 | | - | let addr1 = toBase58String(t.sellOrder.sender.bytes) |
---|
27 | | - | let o1 = getInteger(matcher, addr1) |
---|
28 | | - | if (if (isDefined(o1)) |
---|
29 | | - | then (o1 == 1) |
---|
30 | | - | else false) |
---|
31 | | - | then (t.sender == tbtcMatcherAddress) |
---|
32 | | - | else false |
---|
33 | | - | case t: SetAssetScriptTransaction => |
---|
34 | | - | true |
---|
35 | | - | case _ => |
---|
36 | | - | false |
---|
37 | | - | } |
---|
| 3 | + | true |
---|