tx · 7oC2n1UpQNyH3xQjGbK4ZsNcVcH5mvZvGuj7CVGLE2Lf
3NALVonJ2gukqfMxzNJNSd3mb4GrinLExbW: -0.03000000 Waves
2019.02.11 16:49 [490564] smart account 3NALVonJ2gukqfMxzNJNSd3mb4GrinLExbW > SELF 0.00000000 Waves
{
"type": 13,
"id": "7oC2n1UpQNyH3xQjGbK4ZsNcVcH5mvZvGuj7CVGLE2Lf",
"fee": 3000000,
"feeAssetId": null,
"timestamp": 1549892989901,
"version": 1,
"sender": "3NALVonJ2gukqfMxzNJNSd3mb4GrinLExbW",
"senderPublicKey": "DuYXHBwHFjmpzaEXsnkX8Mo5MWHbs4rE8K2vA6GPXRSg",
"proofs": [
"wxBP5CM4UvRRc9V4W7cVFZRiBjVvH4YgpH5q2VXniprybJNuzWjZKQyvf6TQpxxKpuj8L8h9nK1Em75xJjG1QkZ"
],
"script": "base64:AQQAAAAJYmV0QW1vdW50AAAAAAAF9eEABAAAAAlkYXRhVHhGZWUAAAAAAACYloAEAAAACXBheW91dEZlZQAAAAAAAAehIAQAAAAGcGxheWVyCAUAAAACdHgAAAAGc2VuZGVyBAAAAAN3aW4AAAAAAAAAAAIEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAEAAAACXRtcENob2ljZQkBAAAAB2V4dHJhY3QAAAABCQAEEAAAAAIIBQAAAAF0AAAABGRhdGECAAAABkNob2ljZQQAAAALcGF5bWVudFR4SWQJAQAAAAdleHRyYWN0AAAAAQkABBMAAAACCAUAAAABdAAAAARkYXRhAgAAAAtsYXN0UGF5bWVudAQAAAAJcGF5bWVudFR4CQAD6AAAAAEJAAJZAAAAAQUAAAALcGF5bWVudFR4SWQEAAAAByRtYXRjaDEFAAAACXBheW1lbnRUeAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAA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kmiGXp9p
Diff:
Old | New | | Differences |
---|
12 | 12 | | let paymentTx = transactionById(fromBase58String(paymentTxId)) |
---|
13 | 13 | | match paymentTx { |
---|
14 | 14 | | case paymentTx: TransferTransaction => |
---|
15 | | - | if (if ((3 >= tmpChoice)) |
---|
| 15 | + | if (if (if ((3 >= tmpChoice)) |
---|
16 | 16 | | then (tmpChoice >= 1) |
---|
17 | 17 | | else false) |
---|
18 | 18 | | then (size(t.data) == 3) |
---|
| 19 | + | else false) |
---|
| 20 | + | then sigVerify(t.bodyBytes, t.proofs[0], paymentTx.senderPublicKey) |
---|
19 | 21 | | else false |
---|
20 | 22 | | case _ => |
---|
21 | 23 | | true |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 1 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let betAmount = 100000000 |
---|
4 | 4 | | let dataTxFee = 10000000 |
---|
5 | 5 | | let payoutFee = 500000 |
---|
6 | 6 | | let player = tx.sender |
---|
7 | 7 | | let win = 2 |
---|
8 | 8 | | match tx { |
---|
9 | 9 | | case t: DataTransaction => |
---|
10 | 10 | | let tmpChoice = extract(getInteger(t.data, "Choice")) |
---|
11 | 11 | | let paymentTxId = extract(getString(t.data, "lastPayment")) |
---|
12 | 12 | | let paymentTx = transactionById(fromBase58String(paymentTxId)) |
---|
13 | 13 | | match paymentTx { |
---|
14 | 14 | | case paymentTx: TransferTransaction => |
---|
15 | | - | if (if ((3 >= tmpChoice)) |
---|
| 15 | + | if (if (if ((3 >= tmpChoice)) |
---|
16 | 16 | | then (tmpChoice >= 1) |
---|
17 | 17 | | else false) |
---|
18 | 18 | | then (size(t.data) == 3) |
---|
| 19 | + | else false) |
---|
| 20 | + | then sigVerify(t.bodyBytes, t.proofs[0], paymentTx.senderPublicKey) |
---|
19 | 21 | | else false |
---|
20 | 22 | | case _ => |
---|
21 | 23 | | true |
---|
22 | 24 | | } |
---|
23 | 25 | | case payout: TransferTransaction => |
---|
24 | 26 | | let paymentTxId = extract(getString(player, "lastPayment")) |
---|
25 | 27 | | let paymentTx = transactionById(fromBase58String(paymentTxId)) |
---|
26 | 28 | | let heightChoice = extract(getInteger(player, paymentTxId)) |
---|
27 | 29 | | match paymentTx { |
---|
28 | 30 | | case paymentTx: TransferTransaction => |
---|
29 | 31 | | if ((extract(getInteger(player, "Choice")) == win)) |
---|
30 | 32 | | then (paymentTx.sender == payout.recipient) |
---|
31 | 33 | | else false |
---|
32 | 34 | | case _ => |
---|
33 | 35 | | false |
---|
34 | 36 | | } |
---|
35 | 37 | | case _ => |
---|
36 | 38 | | true |
---|
37 | 39 | | } |
---|