tx · 8XicecwX3gyfmaxSbG7G1oWcraGSVitCfXzavkAxr2SX

3N2XMreh8Ciz5Mfbaohr3fmGf5hdQ9iFxT9:  -0.01400000 Waves

2019.08.19 18:15 [638200] smart account 3N2XMreh8Ciz5Mfbaohr3fmGf5hdQ9iFxT9 > SELF 0.00000000 Waves

{ "type": 13, "id": "8XicecwX3gyfmaxSbG7G1oWcraGSVitCfXzavkAxr2SX", "fee": 1400000, "feeAssetId": null, "timestamp": 1566227766769, "version": 1, "sender": "3N2XMreh8Ciz5Mfbaohr3fmGf5hdQ9iFxT9", "senderPublicKey": "2DVh17YQM5bz6h4WMCMQBZ7oV3Kigdg2S99QZ4HZ2BfU", "proofs": [ "2Bt7yoybVXtCBfubDZsh5zdLMEJwuwaGqq8q52TNvFstT3iDRWvYNRP7afjDTFsmMWqH5pcjoX9W4GCvJStT9oCQ" ], "script": "base64:AwQAAAAHUHViS2V5MQEAAAAgaQxxSAhSITOlMYdvwKcfK7u/x0yzOg/68EH0ax0QlWUEAAAAB1B1YktleTIBAAAAILb58FcZXTIbjEshMW6ayDB2XcNop87YatlbtNE8j6N0BAAAAARzaWcxAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAB1B1YktleTEAAAAAAAAAAAEAAAAAAAAAAAAEAAAABHNpZzIDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAHUHViS2V5MgAAAAAAAAAAAQAAAAAAAAAAAAkAAGYAAAACCQAAZAAAAAIFAAAABHNpZzEFAAAABHNpZzIAAAAAAAAAAADO+UOI", "chainId": 84, "height": 638200, "spentComplexity": 0 } View: original | compacted Prev: HBAM8uUikLLyqczNTB5G9XoxHzfD1bwNvw78ft3jgn4Z Next: D9buqJxBc91HL9SXZ9T8ebLDgocHq9wGHVan9jhNc8ZN Full:
OldNewDifferences
1-{-# STDLIB_VERSION 1 #-}
1+{-# STDLIB_VERSION 3 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
3-let playerAddr = Address(base58'3MyaPJkHmZy4u57uKcHXgzQxsk9wAP9LTZ5')
4-let playerPubKey = base58'EhyhHkMbyNu8PwHoiJVCq2SciN9FmM5KvBeSN2NkTmeL'
5-let casinoAddr = Address(base58'3MyaPJkHmZy4u57uKcHXgzQxsk9wAP9LTZ5')
6-let casinoPubKey = base58'EhyhHkMbyNu8PwHoiJVCq2SciN9FmM5KvBeSN2NkTmeL'
7-let playerSigned = sigVerify(tx.bodyBytes, tx.proofs[0], playerPubKey)
8-let casinoSigned = sigVerify(tx.bodyBytes, tx.proofs[0], casinoPubKey)
9-let bet = 10000000
10-let start = 378412
11-let playerChoiceTime = 100
12-let casinoChoiceTime = 200
13-let playerTakeTimeStart = 1000
14-let casinoTakeTimeStart = 1500
15-let balance = wavesBalance(tx.sender)
16-let casinoChoiceHash = base58'CPAGhCPoDmmr3nU7mncidgnUqw8VW7manPSMZfJaBKaF'
17-let playerPlacedBet = isDefined(getString(tx.sender, "playerChoice"))
18-let casinoPlacedBet = isDefined(getString(tx.sender, "casinoChoice"))
19-match tx {
20- case dtx: DataTransaction =>
21- let num = size(dtx.data)
22- let key = dtx.data[0].key
23- let choice = extract(getString(dtx.data, key))
24- let salt = if (isDefined(dtx.data[1].value))
25- then extract(getString(dtx.data, "salt"))
26- else ""
27- let inputCorrect = if (if (if (if ((key == "playerChoice"))
28- then true
29- else (key == "casinoChoice"))
30- then if ((choice == "0"))
31- then true
32- else (choice == "1")
33- else false)
34- then (balance >= (bet * 2))
35- else false)
36- then (2 >= num)
37- else false
38- let newHash = keccak256(toBytes((choice + salt)))
39- let casinoVerified = (newHash == casinoChoiceHash)
40- let playerTurn = if (if (if ((key == "playerChoice"))
41- then playerSigned
42- else false)
43- then !(playerPlacedBet)
44- else false)
45- then ((start + playerChoiceTime) > height)
46- else false
47- let casinoTurn = if (if (if (if ((key == "casinoChoice"))
48- then casinoSigned
49- else false)
50- then casinoVerified
51- else false)
52- then !(casinoPlacedBet)
53- else false)
54- then ((start + casinoChoiceTime) > height)
55- else false
56- if (inputCorrect)
57- then if (playerTurn)
58- then true
59- else casinoTurn
60- else false
61- case ttx: TransferTransaction =>
62- let withdrawCorrect = if ((ttx.amount >= 10000000))
63- then (1000000 >= ttx.fee)
64- else false
65- let playerTakeTime = if (if ((ttx.recipient == playerAddr))
66- then (height > (start + playerTakeTimeStart))
67- else false)
68- then playerPlacedBet
69- else false
70- let casinoTakeTime = if (if ((ttx.recipient == casinoAddr))
71- then (height > (start + casinoTakeTimeStart))
72- else false)
73- then casinoPlacedBet
74- else false
75- let playerChoise = extract(getString(tx.sender, "playerChoice"))
76- let casinoChoise = extract(getString(tx.sender, "casinoChoice"))
77- let ready = if (playerPlacedBet)
78- then casinoPlacedBet
79- else false
80- let playerWin = if (if (ready)
81- then (playerChoise == casinoChoise)
82- else false)
83- then (ttx.recipient == playerAddr)
84- else false
85- let casinoWin = if (if (ready)
86- then (playerChoise != casinoChoise)
87- else false)
88- then (ttx.recipient == casinoAddr)
89- else false
90- if (if (if (if (playerWin)
91- then true
92- else casinoWin)
93- then true
94- else playerTakeTime)
95- then true
96- else casinoTakeTime)
97- then withdrawCorrect
98- else false
99- case _ =>
100- true
101-}
3+let PubKey1 = base58'854p8BYzrj6yBPRPmfQur3oF1Rjc1AJ548qRp5FT5kDa'
4+let PubKey2 = base58'DKGFPozLrsiR8NM4NJzqQaBYC8NyGYjuw2hDYicQVjco'
5+let sig1 = if (sigVerify(tx.bodyBytes, tx.proofs[0], PubKey1))
6+ then 1
7+ else 0
8+let sig2 = if (sigVerify(tx.bodyBytes, tx.proofs[1], PubKey2))
9+ then 1
10+ else 0
11+((sig1 + sig2) > 0)

github/deemru/w8io/026f985 
24.40 ms