tx · 4nvssZJg5aEAtXpDyh3kUBf6ZpaysBy34Ti4yhxRozG3 3N99tFSk9SDqKjhpSb85FzrPJ4PqAuifoZY: -0.01000000 Waves 2019.01.16 20:07 [452850] smart account 3N99tFSk9SDqKjhpSb85FzrPJ4PqAuifoZY > SELF 0.00000000 Waves
{ "type": 13, "id": "4nvssZJg5aEAtXpDyh3kUBf6ZpaysBy34Ti4yhxRozG3", "fee": 1000000, "feeAssetId": null, "timestamp": 1547658468315, "version": 1, "sender": "3N99tFSk9SDqKjhpSb85FzrPJ4PqAuifoZY", "senderPublicKey": "fHBfJwFWXz6t6vXcrU1Rq1dTjEdU693YcirbTSfrjFc", "proofs": [ "eGEmUQfs6uR1KbsDjL3gdSEHRmpQcasj9GKsx3sQVk4zpKwj8My3D7ULZmfNgmyQrFqJ6iWkrV6FFEN8nekP9Qj" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAADnNlcnZpY2VBZGRyZXNzCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjdvRjVKNW05QndCRkNtVkpaV3IzQUVIM3U0YzZDTG9COQQAAAAJaGVpZ2h0S2V5AgAAAAZoZWlnaHQEAAAABnN0YWdlMQIAAAAKcDJNb3ZlSGFzaAQAAAAGc3RhZ2UyAgAAAAZwMk1vdmUEAAAABnN0YWdlMwIAAAAGcDFNb3ZlBAAAAAR3YXZlAAAAAAAF9eEABAAAAAdnYW1lQmV0CQAAaAAAAAIAAAAAAAAAAAEFAAAABHdhdmUEAAAAEXNlcnZpY2VDb21taXNzaW9uAAAAAAAAAADIBAAAAARyb2NrAQAAAAEABAAAAAVwYXBlcgEAAAABAQQAAAAIc2Npc3NvcnMBAAAAAQIEAAAACG1hdGNoS2V5CQEAAAAHZXh0cmFjdAAAAAEJAAQcAAAAAgUAAAACbWUCAAAACG1hdGNoS2V5BAAAAApwbGF5ZXIxS2V5CQEAAAAHZXh0cmFjdAAAAAEJAAQcAAAAAgUAA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AAAB3Byb3RlY3QJAABnAAAAAgAAAAAAAAknwAgFAAAABnBheW91dAAAAANmZWUEAAAADWlzUGF5b3V0VmFsaWQDCQAAAAAAAAIFAAAABXNjb3JlAAAAAAAAAAAAAwMDCQAAAAAAAAIJAAGQAAAAAQgFAAAABnBheW91dAAAAAl0cmFuc2ZlcnMAAAAAAAAAAAMJAAAAAAAAAggJAAGRAAAAAggFAAAABnBheW91dAAAAAl0cmFuc2ZlcnMAAAAAAAAAAAEAAAAGYW1vdW50CAkAAZEAAAACCAUAAAAGcGF5b3V0AAAACXRyYW5zZmVycwAAAAAAAAAAAgAAAAZhbW91bnQHCQAAAAAAAAIICQABkQAAAAIIBQAAAAZwYXlvdXQAAAAJdHJhbnNmZXJzAAAAAAAAAAABAAAACXJlY2lwaWVudAUAAAACcDEHCQAAAAAAAAIICQABkQAAAAIIBQAAAAZwYXlvdXQAAAAJdHJhbnNmZXJzAAAAAAAAAAACAAAACXJlY2lwaWVudAUAAAACcDIHBAAAAAZ3aW5uZXIDCQAAZgAAAAIFAAAABXNjb3JlAAAAAAAAAAAABQAAAAJwMQUAAAACcDIDCQAAAAAAAAIJAAGQAAAAAQgFAAAABnBheW91dAAAAAl0cmFuc2ZlcnMAAAAAAAAAAAIJAAAAAAAAAggJAAGRAAAAAggFAAAABnBheW91dAAAAAl0cmFuc2ZlcnMAAAAAAAAAAAEAAAAJcmVjaXBpZW50BQAAAAZ3aW5uZXIHAwMFAAAAB3Byb3RlY3QFAAAAFGlzQ29tbWlzc2lvbkluY2x1ZGVkBwUAAAANaXNQYXlvdXRWYWxpZAcHmEAhmQ==", "chainId": 84, "height": 452850, "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 me = tx.sender | |
4 | + | let serviceAddress = addressFromString("3N7oF5J5m9BwBFCmVJZWr3AEH3u4c6CLoB9") | |
5 | + | let heightKey = "height" | |
6 | + | let stage1 = "p2MoveHash" | |
7 | + | let stage2 = "p2Move" | |
8 | + | let stage3 = "p1Move" | |
9 | + | let wave = 100000000 | |
10 | + | let gameBet = (1 * wave) | |
11 | + | let serviceCommission = 200 | |
12 | + | let rock = base58'1' | |
13 | + | let paper = base58'2' | |
14 | + | let scissors = base58'3' | |
15 | + | let matchKey = extract(getBinary(me, "matchKey")) | |
16 | + | let player1Key = extract(getBinary(me, "player1Key")) | |
17 | + | match tx { | |
18 | + | case dataTx: DataTransaction => | |
19 | + | let dataTxFeeIsOk = (dataTx.fee == 500000) | |
20 | + | let dataTxDataIsOk = if (isDefined(getBinary(dataTx.data, stage1))) | |
21 | + | then { | |
22 | + | let oldHeight = if (isDefined(getInteger(me, heightKey))) | |
23 | + | then extract(getInteger(me, heightKey)) | |
24 | + | else 9223372036854775807 | |
25 | + | let canWriteP2Move = if (!(isDefined(getBinary(me, stage1)))) | |
26 | + | then true | |
27 | + | else (-3 > (oldHeight - height)) | |
28 | + | let isDataSizeValid = (size(dataTx.data) == 3) | |
29 | + | let isHeightFieldCorrect = if (if ((height == extract(getInteger(dataTx.data, heightKey)))) | |
30 | + | then true | |
31 | + | else ((height - 1) == extract(getInteger(dataTx.data, heightKey)))) | |
32 | + | then true | |
33 | + | else ((height + 1) == extract(getInteger(dataTx.data, heightKey))) | |
34 | + | if (if (canWriteP2Move) | |
35 | + | then isDataSizeValid | |
36 | + | else false) | |
37 | + | then isHeightFieldCorrect | |
38 | + | else false | |
39 | + | } | |
40 | + | else if (isDefined(getBinary(dataTx.data, stage2))) | |
41 | + | then if (if (if (!(isDefined(getBinary(me, stage2)))) | |
42 | + | then (size(dataTx.data) == 2) | |
43 | + | else false) | |
44 | + | then (sha256(extract(getBinary(dataTx.data, stage2))) == extract(getBinary(me, stage1))) | |
45 | + | else false) | |
46 | + | then match transactionById(extract(getBinary(dataTx.data, "payment"))) { | |
47 | + | case p2payment: TransferTransaction => | |
48 | + | if (if (if (if (if ((size(p2payment.attachment) == 32)) | |
49 | + | then (sha256(p2payment.attachment) == extract(getBinary(me, stage1))) | |
50 | + | else false) | |
51 | + | then (p2payment.amount == (1 * wave)) | |
52 | + | else false) | |
53 | + | then (p2payment.recipient == me) | |
54 | + | else false) | |
55 | + | then (p2payment.senderPublicKey == extract(getBinary(me, "player2Key"))) | |
56 | + | else false) | |
57 | + | then sigVerify(p2payment.bodyBytes, p2payment.proofs[0], p2payment.senderPublicKey) | |
58 | + | else false | |
59 | + | case _ => | |
60 | + | false | |
61 | + | } | |
62 | + | else false | |
63 | + | else if (isDefined(getBinary(dataTx.data, stage3))) | |
64 | + | then { | |
65 | + | let isP1NotYetRevealed = !(isDefined(getBinary(me, stage3))) | |
66 | + | let isSizeValid = (size(dataTx.data) == 1) | |
67 | + | let isProofValid = (size(extract(getBinary(dataTx.data, stage3))) == 32) | |
68 | + | let isShaValid = (sha256(extract(getBinary(dataTx.data, stage3))) == extract(getBinary(me, "p1MoveHash"))) | |
69 | + | if (if (if (isP1NotYetRevealed) | |
70 | + | then isSizeValid | |
71 | + | else false) | |
72 | + | then isProofValid | |
73 | + | else false) | |
74 | + | then isShaValid | |
75 | + | else false | |
76 | + | } | |
77 | + | else false | |
78 | + | if (dataTxFeeIsOk) | |
79 | + | then dataTxDataIsOk | |
80 | + | else false | |
81 | + | case payout: MassTransferTransaction => | |
82 | + | let p1moves = take(extract(getBinary(me, stage3)), 3) | |
83 | + | let p2moves = take(extract(getBinary(me, stage2)), 3) | |
84 | + | let p1m1 = take(p1moves, 1) | |
85 | + | let p2m1 = take(p2moves, 1) | |
86 | + | let p1m2 = takeRightBytes(take(p1moves, 2), 1) | |
87 | + | let p2m2 = takeRightBytes(take(p2moves, 2), 1) | |
88 | + | let p1m3 = takeRightBytes(p1moves, 1) | |
89 | + | let p2m3 = takeRightBytes(p2moves, 1) | |
90 | + | let round1 = if (if (if (if ((p1m1 == rock)) | |
91 | + | then (p2m1 == scissors) | |
92 | + | else false) | |
93 | + | then true | |
94 | + | else if ((p1m1 == paper)) | |
95 | + | then (p2m1 == rock) | |
96 | + | else false) | |
97 | + | then true | |
98 | + | else if ((p1m1 == scissors)) | |
99 | + | then (p2m1 == paper) | |
100 | + | else false) | |
101 | + | then 1 | |
102 | + | else if ((p1m1 == p2m1)) | |
103 | + | then 0 | |
104 | + | else -1 | |
105 | + | let round2 = if (if (if (if ((p1m2 == rock)) | |
106 | + | then (p2m2 == scissors) | |
107 | + | else false) | |
108 | + | then true | |
109 | + | else if ((p1m2 == paper)) | |
110 | + | then (p2m2 == rock) | |
111 | + | else false) | |
112 | + | then true | |
113 | + | else if ((p1m2 == scissors)) | |
114 | + | then (p2m2 == paper) | |
115 | + | else false) | |
116 | + | then 1 | |
117 | + | else if ((p1m2 == p2m2)) | |
118 | + | then 0 | |
119 | + | else -1 | |
120 | + | let round3 = if (if (if (if ((p1m3 == rock)) | |
121 | + | then (p2m3 == scissors) | |
122 | + | else false) | |
123 | + | then true | |
124 | + | else if ((p1m3 == paper)) | |
125 | + | then (p2m3 == rock) | |
126 | + | else false) | |
127 | + | then true | |
128 | + | else if ((p1m3 == scissors)) | |
129 | + | then (p2m3 == paper) | |
130 | + | else false) | |
131 | + | then 1 | |
132 | + | else if ((p1m3 == p2m3)) | |
133 | + | then 0 | |
134 | + | else -1 | |
135 | + | let score = ((round1 + round2) + round3) | |
136 | + | let p1 = addressFromPublicKey(player1Key) | |
137 | + | let p2 = addressFromPublicKey(extract(getBinary(me, "player2Key"))) | |
138 | + | let isCommissionIncluded = if ((payout.transfers[0].recipient == serviceAddress)) | |
139 | + | then (payout.transfers[0].amount == (gameBet / serviceCommission)) | |
140 | + | else false | |
141 | + | let protect = (600000 >= payout.fee) | |
142 | + | let isPayoutValid = if ((score == 0)) | |
143 | + | then if (if (if ((size(payout.transfers) == 3)) | |
144 | + | then (payout.transfers[1].amount == payout.transfers[2].amount) | |
145 | + | else false) | |
146 | + | then (payout.transfers[1].recipient == p1) | |
147 | + | else false) | |
148 | + | then (payout.transfers[2].recipient == p2) | |
149 | + | else false | |
150 | + | else { | |
151 | + | let winner = if ((score > 0)) | |
152 | + | then p1 | |
153 | + | else p2 | |
154 | + | if ((size(payout.transfers) == 2)) | |
155 | + | then (payout.transfers[1].recipient == winner) | |
156 | + | else false | |
157 | + | } | |
158 | + | if (if (protect) | |
159 | + | then isCommissionIncluded | |
160 | + | else false) | |
161 | + | then isPayoutValid | |
162 | + | else false | |
163 | + | case _ => | |
164 | + | false | |
165 | + | } |
github/deemru/w8io/169f3d6 35.80 ms ◑