tx · 3t5xtps2oZw576wQyekfqxHaYyP2hwgpX3rbLQcPVRfX 3MrUVmgATdSapmiatBMczVrhy4sLBCfKy3N: -0.01000000 Waves 2019.01.14 19:02 [449874] smart account 3MrUVmgATdSapmiatBMczVrhy4sLBCfKy3N > SELF 0.00000000 Waves
{ "type": 13, "id": "3t5xtps2oZw576wQyekfqxHaYyP2hwgpX3rbLQcPVRfX", "fee": 1000000, "feeAssetId": null, "timestamp": 1547481709202, "version": 1, "sender": "3MrUVmgATdSapmiatBMczVrhy4sLBCfKy3N", "senderPublicKey": "5xy1cd2XFWmDTmr2WSr4LxCsCHwPxUbJmMKVvNqEiVxG", "proofs": [ "55Suiih5qRRjjNpqiG5kaZ68PnysNJX1ionBJZyVwxQTQAmwGSYcUnpvs3V3udYbN9UAabSJSg1h6RdbXnEpiYLa" ], "script": "base64:AQQAAAAEV0FWRQAAAAAABfXhAAQAAAAJYmV0QW1vdW50CQAAaAAAAAIAAAAAAAAAAAEFAAAABFdBVkUEAAAADW1pbkhlaWdodERpZmYAAAAAAAAAADwEAAAAAm1lCAUAAAACdHgAAAAGc2VuZGVyBAAAABBoZWlnaHRUb0dldE1vbmV5CQEAAAAHZXh0cmFjdAAAAAEJAAQaAAAAAgUAAAACbWUCAAAAEGhlaWdodFRvR2V0TW9uZXkEAAAACXBheW91dEZlZQAAAAAAAAehIAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAQAAAAIZ2FtZU92ZXIJAABnAAAAAgUAAAAGaGVpZ2h0BQAAABBoZWlnaHRUb0dldE1vbmV5BAAAAAtwYXltZW50VHhJZAkBAAAAB2V4dHJhY3QAAAABCQAEEwAAAAIIBQAAAAF0AAAABGRhdGECAAAAC2xhc3RQYXltZW50BAAAAAlwYXltZW50VHgJAAPoAAAAAQkAAlkAAAABBQAAAAtwYXltZW50VHhJZAQAAAAHJG1hd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CAUAAAABdAAAAAZwcm9vZnMAAAAAAAAAAAEJAQAAAAdleHRyYWN0AAAAAQkABB0AAAACBQAAAAJtZQIAAAALbGFzdFBheW1lbnQDAwMDAwMDCQEAAAABIQAAAAEFAAAACGdhbWVPdmVyCQEAAAABIQAAAAEFAAAAEGRvdWJsZVBheW1lbnRVc2UHBQAAAAdpc1ZhbGlkBwUAAAANaGVpZ2h0SXNWYWxpZAcFAAAAC2NvcnJlY3REYXRhBwUAAAANbGlua2VkQ29ycmVjdAcFAAAABnNpZ25lZAcFAAAADGNvcnJlY3RBc3NldAcHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAZwYXlvdXQFAAAAByRtYXRjaDAEAAAADWxhc3RQYXltZW50VHgJAAPoAAAAAQkAAlkAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQdAAAAAgUAAAACbWUCAAAAC2xhc3RQYXltZW50BAAAAAckbWF0Y2gxBQAAAA1sYXN0UGF5bWVudFR4AwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAA1sYXN0UGF5bWVudFR4BQAAAAckbWF0Y2gxAwMDCQAAZwAAAAIFAAAABmhlaWdodAUAAAAQaGVpZ2h0VG9HZXRNb25leQkAAAAAAAACCAUAAAANbGFzdFBheW1lbnRUeAAAAAZzZW5kZXIIBQAAAAZwYXlvdXQAAAAJcmVjaXBpZW50BwkAAAAAAAACCAUAAAAGcGF5b3V0AAAAA2ZlZQUAAAAJcGF5b3V0RmVlBwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAABnBheW91dAAAAApmZWVBc3NldElkBwcHonXTkA==", "chainId": 84, "height": 449874, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let WAVE = 100000000 | |
4 | + | let betAmount = (1 * WAVE) | |
5 | + | let minHeightDiff = 60 | |
6 | + | let me = tx.sender | |
7 | + | let heightToGetMoney = extract(getInteger(me, "heightToGetMoney")) | |
8 | + | let payoutFee = 500000 | |
9 | + | match tx { | |
10 | + | case t: DataTransaction => | |
11 | + | let gameOver = (height >= heightToGetMoney) | |
12 | + | let paymentTxId = extract(getString(t.data, "lastPayment")) | |
13 | + | let paymentTx = transactionById(fromBase58String(paymentTxId)) | |
14 | + | match paymentTx { | |
15 | + | case paymentTx: TransferTransaction => | |
16 | + | let doublePaymentUse = isDefined(getString(me, paymentTxId)) | |
17 | + | let isValid = (paymentTx.amount >= (betAmount + t.fee)) | |
18 | + | let validRecipient = (paymentTx.recipient == me) | |
19 | + | let correctAsset = !(isDefined(paymentTx.assetId)) | |
20 | + | let newHeightToGetMoney = extract(getInteger(t.data, "heightToGetMoney")) | |
21 | + | let heightIsValid = ((newHeightToGetMoney - height) > minHeightDiff) | |
22 | + | let correctData = if ((size(t.data) == 3)) | |
23 | + | then isDefined(getString(t.data, paymentTxId)) | |
24 | + | else false | |
25 | + | let signed = sigVerify(t.bodyBytes, t.proofs[0], paymentTx.senderPublicKey) | |
26 | + | let linkedCorrect = (toBase58String(t.proofs[1]) == extract(getString(me, "lastPayment"))) | |
27 | + | if (if (if (if (if (if (if (!(gameOver)) | |
28 | + | then !(doublePaymentUse) | |
29 | + | else false) | |
30 | + | then isValid | |
31 | + | else false) | |
32 | + | then heightIsValid | |
33 | + | else false) | |
34 | + | then correctData | |
35 | + | else false) | |
36 | + | then linkedCorrect | |
37 | + | else false) | |
38 | + | then signed | |
39 | + | else false) | |
40 | + | then correctAsset | |
41 | + | else false | |
42 | + | case _ => | |
43 | + | false | |
44 | + | } | |
45 | + | case payout: TransferTransaction => | |
46 | + | let lastPaymentTx = transactionById(fromBase58String(extract(getString(me, "lastPayment")))) | |
47 | + | match lastPaymentTx { | |
48 | + | case lastPaymentTx: TransferTransaction => | |
49 | + | if (if (if ((height >= heightToGetMoney)) | |
50 | + | then (lastPaymentTx.sender == payout.recipient) | |
51 | + | else false) | |
52 | + | then (payout.fee == payoutFee) | |
53 | + | else false) | |
54 | + | then !(isDefined(payout.feeAssetId)) | |
55 | + | else false | |
56 | + | case _ => | |
57 | + | false | |
58 | + | } | |
59 | + | case _ => | |
60 | + | false | |
61 | + | } |
github/deemru/w8io/026f985 15.46 ms ◑