tx · HdjGxMbGVN49PKScdm2mKNNr7J9qKgX1zDCehHZEzwro 3ND5JJRriySvxp2pRx3xcVRZjzT5B6HjCmD: -0.09000000 Waves 2019.02.10 21:40 [489414] smart account 3ND5JJRriySvxp2pRx3xcVRZjzT5B6HjCmD > SELF 0.00000000 Waves
{ "type": 13, "id": "HdjGxMbGVN49PKScdm2mKNNr7J9qKgX1zDCehHZEzwro", "fee": 9000000, "feeAssetId": null, "timestamp": 1549824064024, "version": 1, "sender": "3ND5JJRriySvxp2pRx3xcVRZjzT5B6HjCmD", "senderPublicKey": "JAiVrBFf3yP6XsdsoAp9s3PNGVHXzWfgDymg9xQ4Mz4V", "proofs": [ "4kETTjLmMk1Nv987miQ4t2q3W1Y4P5gax7fptk9aTPZGxBao1ezXbC4YwJostSzXhKLWroVdntLAQPfXSBuQXz74" ], "script": "base64:AQQAAAAJYmV0QW1vdW50AAAAAAAF9eEABAAAAAlkYXRhVHhGZWUAAAAAAACYloAEAAAACXBheW91dEZlZQAAAAAAAAehIAQAAAAGcGxheWVyCAUAAAACdHgAAAAGc2VuZGVyBAAAAAN3aW4AAAAAAAAAAAIEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAEAAAACXRtcENob2ljZQkBAAAAB2V4dHJhY3QAAAABCQAEEAAAAAIIBQAAAAF0AAAABGRhdGECAAAABkNob2ljZQQAAAALcGF5bWVudFR4SWQJAQAAAAdleHRyYWN0AAAAAQkABBMAAAACCAUAAAABdAAAAARkYXRhAgAAAAtsYXN0UGF5bWVudAQAAAAJcGF5bWVudFR4CQAD6AAAAAEJAAJZAAAAAQUAAAALcGF5bWVudFR4SWQEAAAAByRtYXRjaDEFAAAACXBheW1lbnRUeAMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAAJcGF5bWVudFR4BQAAAAck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AggFAAAACXBheW1lbnRUeAAAAAZzZW5kZXIIBQAAAAZwYXlvdXQAAAAJcmVjaXBpZW50BwcHh+skEg==", "chainId": 84, "height": 489414, "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 betAmount = 100000000 | |
4 | + | let dataTxFee = 10000000 | |
5 | + | let payoutFee = 500000 | |
6 | + | let player = tx.sender | |
7 | + | let win = 2 | |
8 | + | match tx { | |
9 | + | case t: DataTransaction => | |
10 | + | let tmpChoice = extract(getInteger(t.data, "Choice")) | |
11 | + | let paymentTxId = extract(getString(t.data, "lastPayment")) | |
12 | + | let paymentTx = transactionById(fromBase58String(paymentTxId)) | |
13 | + | match paymentTx { | |
14 | + | case paymentTx: TransferTransaction => | |
15 | + | if (if (if (if (if (if ((3 >= tmpChoice)) | |
16 | + | then (tmpChoice >= 1) | |
17 | + | else false) | |
18 | + | then !(isDefined(getString(player, paymentTxId))) | |
19 | + | else false) | |
20 | + | then (paymentTx.recipient == player) | |
21 | + | else false) | |
22 | + | then !(isDefined(paymentTx.assetId)) | |
23 | + | else false) | |
24 | + | then (size(t.data) == 3) | |
25 | + | else false) | |
26 | + | then sigVerify(t.bodyBytes, t.proofs[0], paymentTx.senderPublicKey) | |
27 | + | else false | |
28 | + | case _ => | |
29 | + | false | |
30 | + | } | |
31 | + | case payout: TransferTransaction => | |
32 | + | let paymentTxId = extract(getString(player, "lastPayment")) | |
33 | + | let paymentTx = transactionById(fromBase58String(paymentTxId)) | |
34 | + | let heightChoice = extract(getInteger(player, paymentTxId)) | |
35 | + | match paymentTx { | |
36 | + | case paymentTx: TransferTransaction => | |
37 | + | if ((extract(getInteger(player, "Choice")) == win)) | |
38 | + | then (paymentTx.sender == payout.recipient) | |
39 | + | else false | |
40 | + | case _ => | |
41 | + | false | |
42 | + | } | |
43 | + | case _ => | |
44 | + | false | |
45 | + | } |
github/deemru/w8io/026f985 20.03 ms ◑