tx · uP74Wagis6MFRbPQrxNNnSvFLZvy4ASuXjcdATaPuPx
3NALVonJ2gukqfMxzNJNSd3mb4GrinLExbW: -0.03000000 Waves
2019.02.11 16:44 [490559] smart account 3NALVonJ2gukqfMxzNJNSd3mb4GrinLExbW > SELF 0.00000000 Waves
{
"type": 13,
"id": "uP74Wagis6MFRbPQrxNNnSvFLZvy4ASuXjcdATaPuPx",
"fee": 3000000,
"feeAssetId": null,
"timestamp": 1549892664581,
"version": 1,
"sender": "3NALVonJ2gukqfMxzNJNSd3mb4GrinLExbW",
"senderPublicKey": "DuYXHBwHFjmpzaEXsnkX8Mo5MWHbs4rE8K2vA6GPXRSg",
"proofs": [
"4n5yuMb68b6SX66C2hdsyxXAKkV9Ki1ELT5XqBBkcnzCeDmisU92vxwFD6TJzsV8NzxpBjLVxCpGytjRyBZkgCvt"
],
"script": "base64:AQQAAAAJYmV0QW1vdW50AAAAAAAF9eEABAAAAAlkYXRhVHhGZWUAAAAAAACYloAEAAAACXBheW91dEZlZQAAAAAAAAehIAQAAAAGcGxheWVyCAUAAAACdHgAAAAGc2VuZGVyBAAAAAN3aW4AAAAAAAAAAAIEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAEAAAACXRtcENob2ljZQkBAAAAB2V4dHJhY3QAAAABCQAEEAAAAAIIBQAAAAF0AAAABGRhdGECAAAABkNob2ljZQQAAAALcGF5bWVudFR4SWQJAQAAAAdleHRyYWN0AAAAAQkABBMAAAACCAUAAAABdAAAAARkYXRhAgAAAAtsYXN0UGF5bWVudAQAAAAJcGF5bWVudFR4CQAD6AAAAAEJAAJZAAAAAQUAAAALcGF5bWVudFR4SWQEAAAAByRtYXRjaDEFAAAACXBheW1lbnRUeAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAJcGF5bWVudFR4BQAAAAckbWF0Y2gxAwMJAABnAAAAAgAAAAAAAAAAAwUAAAAJdG1wQ2hvaWNlCQAAZwAAAAIFAAAACXRtcENob2ljZQAAAAAAAAAAAQcJAAAAAAAAAgkAAZAAAAABCAUAAAABdAAAAARkYXRhAAAAAAAAAAADBwYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAABnBheW91dAUAAAAHJG1hdGNoMAQAAAALcGF5bWVudFR4SWQJAQAAAAdleHRyYWN0AAAAAQkABB0AAAACBQAAAAZwbGF5ZXICAAAAC2xhc3RQYXltZW50BAAAAAlwYXltZW50VHgJAAPoAAAAAQkAAlkAAAABBQAAAAtwYXltZW50VHhJZAQAAAAMaGVpZ2h0Q2hvaWNlCQEAAAAHZXh0cmFjdAAAAAEJAAQaAAAAAgUAAAAGcGxheWVyBQAAAAtwYXltZW50VHhJZAQAAAAHJG1hdGNoMQUAAAAJcGF5bWVudFR4AwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAlwYXltZW50VHgFAAAAByRtYXRjaDEDCQAAAAAAAAIJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAZwbGF5ZXICAAAABkNob2ljZQUAAAADd2luCQAAAAAAAAIIBQAAAAlwYXltZW50VHgAAAAGc2VuZGVyCAUAAAAGcGF5b3V0AAAACXJlY2lwaWVudAcHBgpN3oM=",
"chainId": 84,
"height": 490559,
"spentComplexity": 0
}
View: original | compacted
Prev: BCAtAYjChno7CEmfrS2RnHq7bJDq2zC3ztjL9hf9EwSu
Next: 7oC2n1UpQNyH3xQjGbK4ZsNcVcH5mvZvGuj7CVGLE2Lf
Diff:
Old | New | | Differences |
---|
12 | 12 | | let paymentTx = transactionById(fromBase58String(paymentTxId)) |
---|
13 | 13 | | match paymentTx { |
---|
14 | 14 | | case paymentTx: TransferTransaction => |
---|
15 | | - | if ((3 >= tmpChoice)) |
---|
| 15 | + | if (if ((3 >= tmpChoice)) |
---|
16 | 16 | | then (tmpChoice >= 1) |
---|
| 17 | + | else false) |
---|
| 18 | + | then (size(t.data) == 3) |
---|
17 | 19 | | else false |
---|
18 | 20 | | case _ => |
---|
19 | 21 | | 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 ((3 >= tmpChoice)) |
---|
| 15 | + | if (if ((3 >= tmpChoice)) |
---|
16 | 16 | | then (tmpChoice >= 1) |
---|
| 17 | + | else false) |
---|
| 18 | + | then (size(t.data) == 3) |
---|
17 | 19 | | else false |
---|
18 | 20 | | case _ => |
---|
19 | 21 | | true |
---|
20 | 22 | | } |
---|
21 | 23 | | case payout: TransferTransaction => |
---|
22 | 24 | | let paymentTxId = extract(getString(player, "lastPayment")) |
---|
23 | 25 | | let paymentTx = transactionById(fromBase58String(paymentTxId)) |
---|
24 | 26 | | let heightChoice = extract(getInteger(player, paymentTxId)) |
---|
25 | 27 | | match paymentTx { |
---|
26 | 28 | | case paymentTx: TransferTransaction => |
---|
27 | 29 | | if ((extract(getInteger(player, "Choice")) == win)) |
---|
28 | 30 | | then (paymentTx.sender == payout.recipient) |
---|
29 | 31 | | else false |
---|
30 | 32 | | case _ => |
---|
31 | 33 | | false |
---|
32 | 34 | | } |
---|
33 | 35 | | case _ => |
---|
34 | 36 | | true |
---|
35 | 37 | | } |
---|