tx · EEnDYAfgBFCYWCYbKWHrMZXyG51yD671qDUP3XhRZmam

3N1hdTLt5mB2Qs3TF9z39uuEtrCLNQDjzjE:  -0.01000000 Waves

2019.02.06 23:26 [483676] smart account 3N1hdTLt5mB2Qs3TF9z39uuEtrCLNQDjzjE > SELF 0.00000000 Waves

{ "type": 13, "id": "EEnDYAfgBFCYWCYbKWHrMZXyG51yD671qDUP3XhRZmam", "fee": 1000000, "feeAssetId": null, "timestamp": 1549484906430, "version": 1, "sender": "3N1hdTLt5mB2Qs3TF9z39uuEtrCLNQDjzjE", "senderPublicKey": "3M1Cose4hZf1WGybL3awMXHzKkmBDtTidgFyuWhAYGLk", "proofs": [ "5bzURm17QzgeEtRYSCMjt3WywJ3Yjm69XECk2LcZhgtem1Y2JQ3Veq1NU6zEKtaEt7BXhj1KaZBi2JmJaMn4pwpi" ], "script": "base64:AQQAAAAQY2FzaW5vc1B1YmxpY0tleQEAAAAg++4D0np85s4U1tfih28Ct9RpE6ePus2LI+C3n9wjllsEAAAAFmVuY3R5cHRlZENhc2lub3NDaG9pY2UBAAAAIMD5vo3GCDfoBwi+Ep7QHENDto6rss2/IuYco2CGgNbTBAAAAANiZXQAAAAAAHc1lAAEAAAACmNhc2lub3NGZWUAAAAAAAOThwAEAAAAFGRhdGFQbGF5ZXJzUHVibGljS2V5AQAAACAQWVOxP5KbRvsejqXVTBMZr970tCZFmdqAe6BWykIbRwQAAAAMZGF0YUxvY2tlZEF0AAAAAAAAB2FcBAAAAApkaWNlc0NvdW50AAAAAAAAAAAFBAAAABVnYW1lQ29tbWlzc2lvblBlcmNlbnQAAAAAAAAAAAMEAAAAFm1heWJlRGF0YVBsYXllcnNDaG9pY2UJAAQdAAAAAggFAAAAAnR4AAAABnNlbmRlcgIAAAANcGxheWVyc0Nob2ljZQQAAAARZGF0YVBsYXllcnNDaG9pY2UJAQAAAAdleHRyYWN0AAAAAQUAAAAWbWF5YmVEYXRhUGxheWVyc0Nob2ljZQQAAAAWbWF5YmVE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91bnQFAAAAFGdhbWVDb21taXNzaW9uQW1vdW50AwMFAAAAB2ZlZUlzT2sFAAAAEXJlY2lwaWVudElzUGxheWVyBwUAAAAPYW1vdW50SXNDb3JyZWN0BwMFAAAAIGlzUGxheWVyRGVjaWRlZE5vdFRvU2VuZEJldFN0YXRlBAAAABFyZWNpcGllbnRJc0Nhc2lubwkAAAAAAAACCAUAAAADdHR4AAAACXJlY2lwaWVudAUAAAAOY2FzaW5vc0FkZHJlc3MEAAAAD2Ftb3VudElzQ29ycmVjdAMJAAAAAAAAAggFAAAAA3R0eAAAAAZhbW91bnQJAABlAAAAAgUAAAAOaW5pdGlhbEJhbGFuY2UFAAAAFnRyYW5zZmVyVHJhbnNhY3Rpb25GZWUGCQAAAAAAAAIIBQAAAAN0dHgAAAAGYW1vdW50CQAAZQAAAAIJAABlAAAAAgUAAAAOaW5pdGlhbEJhbGFuY2UFAAAAEmRhdGFUcmFuc2FjdGlvbkZlZQUAAAAWdHJhbnNmZXJUcmFuc2FjdGlvbkZlZQMDBQAAAAdmZWVJc09rBQAAABFyZWNpcGllbnRJc0Nhc2lubwcFAAAAD2Ftb3VudElzQ29ycmVjdAcHB+Sv0Oc=", "chainId": 84, "height": 483676, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 1 #-}
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let casinosPublicKey = base58'HxRqMjTQJNEjnaEqWCvg81EZCUky9LhdozdaxFta4SsU'
4+let enctyptedCasinosChoice = base58'DzJ9tATmC3Q7KoZqPpb6tLYACSasHwn8NoDVoy9xqz9G'
5+let bet = 2000000000
6+let casinosFee = 60000000
7+let dataPlayersPublicKey = base58'26pXQubFbm3vEZroPTpLdCjHFx7oMWrSemaz7qzp7oQS'
8+let dataLockedAt = 483676
9+let dicesCount = 5
10+let gameCommissionPercent = 3
11+let maybeDataPlayersChoice = getString(tx.sender, "playersChoice")
12+let dataPlayersChoice = extract(maybeDataPlayersChoice)
13+let maybeDataCasinosChoice = getInteger(tx.sender, "serversChoice")
14+let dataCasinosChoice = extract(maybeDataCasinosChoice)
15+let timeoutInBlocks = 120
16+let dataTransactionFee = 500000
17+let transferTransactionFee = 500000
18+let casinosAddress = addressFromPublicKey(casinosPublicKey)
19+let playersAddress = addressFromPublicKey(dataPlayersPublicKey)
20+let accountBalance = wavesBalance(tx.sender)
21+let senderIsCasino = sigVerify(tx.bodyBytes, tx.proofs[0], casinosPublicKey)
22+let senderIsPlayer = sigVerify(tx.bodyBytes, tx.proofs[0], dataPlayersPublicKey)
23+let divisionFactor = 100
24+let sides = 6
25+let grossWinAmount = ((bet * sides) / dicesCount)
26+let gameCommissionAmount = ((grossWinAmount * gameCommissionPercent) / 100)
27+let serverTransferNoNetworkFee = ((grossWinAmount - gameCommissionAmount) - bet)
28+let initialBalance = ((serverTransferNoNetworkFee + (dataTransactionFee * 2)) + transferTransactionFee)
29+let dataIsValidForLockedState = !(isDefined(maybeDataPlayersChoice))
30+let lockedStateTimeout = (height > (dataLockedAt + timeoutInBlocks))
31+let isLockedState = if (dataIsValidForLockedState)
32+ then !(lockedStateTimeout)
33+ else false
34+let isUserDecidedNotToPlayState = if (dataIsValidForLockedState)
35+ then lockedStateTimeout
36+ else false
37+let dataIsValidForPlayerRevealedState = if (isDefined(maybeDataPlayersChoice))
38+ then !(isDefined(maybeDataCasinosChoice))
39+ else false
40+let playerRevealedStateBalance = (initialBalance - dataTransactionFee)
41+let playerRevealedStateTimeout = if ((height > (dataLockedAt + (timeoutInBlocks * 2))))
42+ then (accountBalance >= playerRevealedStateBalance)
43+ else false
44+let isPlayerRevealedHisChoiceState = if (dataIsValidForPlayerRevealedState)
45+ then !(playerRevealedStateTimeout)
46+ else false
47+let isCasinoDecidedNotToPlayState = if (dataIsValidForPlayerRevealedState)
48+ then playerRevealedStateTimeout
49+ else false
50+let isDataValidForWinnerIsDeterminedState = isDefined(maybeDataCasinosChoice)
51+let isBalanceValidForWinnerIsDeterminedState = (accountBalance >= ((grossWinAmount - gameCommissionAmount) + transferTransactionFee))
52+let isWinnerIsDeterminedState = if (isDataValidForWinnerIsDeterminedState)
53+ then isBalanceValidForWinnerIsDeterminedState
54+ else false
55+let isPlayerDecidedNotToSendBetState = if (isDataValidForWinnerIsDeterminedState)
56+ then !(isBalanceValidForWinnerIsDeterminedState)
57+ else false
58+match tx {
59+ case dtx: DataTransaction =>
60+ let payloadSize = size(dtx.data)
61+ let firstPayloadName = dtx.data[0].key
62+ let secondPayloadName = dtx.data[1].key
63+ let firstPayloadAsInteger = extract(getInteger(dtx.data, firstPayloadName))
64+ let secondPayloadAsString = extract(getString(dtx.data, secondPayloadName))
65+ let feeIsOk = (dtx.fee == dataTransactionFee)
66+ if (isUserDecidedNotToPlayState)
67+ then {
68+ let validLockedAtIsProvided = true
69+ let playersPublicKeyIsProvided = true
70+ let noOtherDataWasProvided = (payloadSize == 2)
71+ if (if (if (if (senderIsCasino)
72+ then feeIsOk
73+ else false)
74+ then validLockedAtIsProvided
75+ else false)
76+ then playersPublicKeyIsProvided
77+ else false)
78+ then noOtherDataWasProvided
79+ else false
80+ }
81+ else if (isLockedState)
82+ then {
83+ let validPlayersDicesCountIsProvided = if ((firstPayloadName == "playersDicesCount"))
84+ then if ((firstPayloadAsInteger >= 1))
85+ then (5 >= firstPayloadAsInteger)
86+ else false
87+ else false
88+ let playerChoice1String = take(secondPayloadAsString, 1)
89+ let playerChoice1Bit = if ((playerChoice1String == "1"))
90+ then 1
91+ else 0
92+ let playerChoice2String = take(drop(secondPayloadAsString, 1), 1)
93+ let playerChoice2Bit = if ((playerChoice2String == "1"))
94+ then 1
95+ else 0
96+ let playerChoice3String = take(drop(secondPayloadAsString, 2), 1)
97+ let playerChoice3Bit = if ((playerChoice3String == "1"))
98+ then 1
99+ else 0
100+ let playerChoice4String = take(drop(secondPayloadAsString, 3), 1)
101+ let playerChoice4Bit = if ((playerChoice4String == "1"))
102+ then 1
103+ else 0
104+ let playerChoice5String = take(drop(secondPayloadAsString, 4), 1)
105+ let playerChoice5Bit = if ((playerChoice5String == "1"))
106+ then 1
107+ else 0
108+ let playerChoice6String = take(drop(secondPayloadAsString, 5), 1)
109+ let playerChoice6Bit = if ((playerChoice6String == "1"))
110+ then 1
111+ else 0
112+ let selectedDicesCount = (((((playerChoice1Bit + playerChoice2Bit) + playerChoice3Bit) + playerChoice4Bit) + playerChoice5Bit) + playerChoice6Bit)
113+ let validPlayersChoiceWasProvided = if (if ((secondPayloadName == "playersChoice"))
114+ then (selectedDicesCount == firstPayloadAsInteger)
115+ else false)
116+ then (size(secondPayloadAsString) == 6)
117+ else false
118+ let noOtherDataWasProvided = (payloadSize == 2)
119+ if (if (if (if (senderIsPlayer)
120+ then feeIsOk
121+ else false)
122+ then validPlayersDicesCountIsProvided
123+ else false)
124+ then validPlayersChoiceWasProvided
125+ else false)
126+ then noOtherDataWasProvided
127+ else false
128+ }
129+ else if (isPlayerRevealedHisChoiceState)
130+ then {
131+ let validCasinoChoiceWasProvided = if ((firstPayloadName == "serversChoice"))
132+ then if ((firstPayloadAsInteger >= 1))
133+ then (6 >= firstPayloadAsInteger)
134+ else false
135+ else false
136+ let casinosSaltWasProvided = (secondPayloadName == "serversSalt")
137+ let choiceAndSaltMatchesHardcodedValue = (keccak256(toBytes((toString(firstPayloadAsInteger) + secondPayloadAsString))) == enctyptedCasinosChoice)
138+ let noOtherDataWasProvided = (payloadSize == 2)
139+ if (if (if (if (if (senderIsCasino)
140+ then feeIsOk
141+ else false)
142+ then validCasinoChoiceWasProvided
143+ else false)
144+ then casinosSaltWasProvided
145+ else false)
146+ then choiceAndSaltMatchesHardcodedValue
147+ else false)
148+ then noOtherDataWasProvided
149+ else false
150+ }
151+ else false
152+ case ttx: TransferTransaction =>
153+ let feeIsOk = (ttx.fee == transferTransactionFee)
154+ if (isWinnerIsDeterminedState)
155+ then {
156+ let playerWon = (take(drop(dataPlayersChoice, (dataCasinosChoice - 1)), 1) == "1")
157+ let winnerAddress = if (playerWon)
158+ then playersAddress
159+ else casinosAddress
160+ let prizeGoesToWinner = if ((ttx.recipient == winnerAddress))
161+ then (ttx.amount == (grossWinAmount - gameCommissionAmount))
162+ else false
163+ if (feeIsOk)
164+ then prizeGoesToWinner
165+ else false
166+ }
167+ else if (isCasinoDecidedNotToPlayState)
168+ then {
169+ let recipientIsPlayer = (ttx.recipient == playersAddress)
170+ let amountIsCorrect = (ttx.amount == (grossWinAmount - gameCommissionAmount))
171+ if (if (feeIsOk)
172+ then recipientIsPlayer
173+ else false)
174+ then amountIsCorrect
175+ else false
176+ }
177+ else if (isPlayerDecidedNotToSendBetState)
178+ then {
179+ let recipientIsCasino = (ttx.recipient == casinosAddress)
180+ let amountIsCorrect = if ((ttx.amount == (initialBalance - transferTransactionFee)))
181+ then true
182+ else (ttx.amount == ((initialBalance - dataTransactionFee) - transferTransactionFee))
183+ if (if (feeIsOk)
184+ then recipientIsCasino
185+ else false)
186+ then amountIsCorrect
187+ else false
188+ }
189+ else false
190+ case _ =>
191+ false
192+}

github/deemru/w8io/026f985 
18.11 ms