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