tx · BVC4WkuJroJxFX7jSTb16LfJZVDaNRfaRnnV3uL36Gkj

3MpMJrHyxSCeQbNpi3ese5AM31gMVTJENKq:  -0.01000000 Waves

2019.02.19 21:06 [502388] smart account 3MpMJrHyxSCeQbNpi3ese5AM31gMVTJENKq > SELF 0.00000000 Waves

{ "type": 13, "id": "BVC4WkuJroJxFX7jSTb16LfJZVDaNRfaRnnV3uL36Gkj", "fee": 1000000, "feeAssetId": null, "timestamp": 1550599608178, "version": 1, "sender": "3MpMJrHyxSCeQbNpi3ese5AM31gMVTJENKq", "senderPublicKey": "7pctuJciuniq6queScpbhGFi2xCKg9YdVuU86ifsjt18", "proofs": [ "21n4vVmrnhB2HtTcRbksorWL9796yAHFmUDJNTfbz3apDjRdWVc1eFHmfHyYjhNioHgGJDpyosKpkqefufwdVVb7" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABXR4RmVlAAAAAAAAB6EgBAAAAAd0aW1lb3V0CQAAaAAAAAIAAAAAAAAAADwAAAAAAAAAABgEAAAACGxpZmVzcGFuAAAAAAAAAAPoBAAAAANlcnIJAAACAAAAAQIAAAAABAAAABVzZXJ2ZXJDaG9pY2VIYXNoQnl0ZXMJAAJZAAAAAQIAAAAsRGdiSnhtcER0Z28zOGRaM3R3SFl1N2RaYmJncVdqU3ZkaW1pZDJpcVVyYVUEAAAABnNlcnZlcgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM040QWliNWl1YldpR016ZFRoNndXaVZEVmJvMzJvZVZVbUgEAAAABnBsYXllcgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM040QWliNWl1YldpR016ZFRoNndXaVZEVmJvMzJvZVZVbUgEAAAADnN0YXJ0aW5nSGVpZ2h0AAAAAAAAB6pzBAAAABJpbml0aWFsU2VydmVyRnVuZHMAAAAAABrpV+AEAAAACWRpY2VDb3VudAAAAAAAAAAAAwQAAAADYmV0AAAAAAAdzWUA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AABgkAAAAAAAACCQAAyQAAAAIJAADKAAAAAgUAAAAMcGxheWVyQ2hvaWNlAAAAAAAAAAAFAAAAAAAAAAABBQAAAAxzZXJ2ZXJDaG9pY2UHAwMJAAAAAAAAAggFAAAABnBheW91dAAAAAlyZWNpcGllbnQDBQAAAApwbGF5ZXJXaW5zBQAAAAZwbGF5ZXIFAAAABnNlcnZlcgkAAAAAAAACCQAB9QAAAAEFAAAAFHNlcnZlckNob2ljZVdpdGhTYWx0BQAAABVzZXJ2ZXJDaG9pY2VIYXNoQnl0ZXMHCQAAAAAAAAIFAAAAAXMFAAAACWRpY2VDb3VudAcJAAAAAAAAAggFAAAABnBheW91dAAAAAlyZWNpcGllbnQFAAAABnBsYXllcgcFAAAAA2VycgcFAAAAA2Vycgewg7NK", "chainId": 84, "height": 502388, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 1 #-}
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let me = tx.sender
4+let txFee = 500000
5+let timeout = (60 * 24)
6+let lifespan = 1000
7+let err = throw("")
8+let serverChoiceHashBytes = fromBase58String("DgbJxmpDtgo38dZ3twHYu7dZbbgqWjSvdimid2iqUraU")
9+let server = addressFromString("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH")
10+let player = addressFromString("3N4Aib5iubWiGMzdTh6wWiVDVbo32oeVUmH")
11+let startingHeight = 502387
12+let initialServerFunds = 451500000
13+let diceCount = 3
14+let bet = 500000000
15+if ((height >= startingHeight))
16+ then match tx {
17+ case payout: TransferTransaction =>
18+ if (if (if (if ((payout.amount == (wavesBalance(me) - txFee)))
19+ then !(isDefined(payout.assetId))
20+ else false)
21+ then !(isDefined(payout.feeAssetId))
22+ else false)
23+ then (payout.fee == txFee)
24+ else false)
25+ then if (((height - startingHeight) > lifespan))
26+ then (payout.recipient == server)
27+ else {
28+ let paymentId = payout.proofs[0]
29+ match transactionById(paymentId) {
30+ case payment: TransferTransaction =>
31+ if (if (if (if ((payment.amount == bet))
32+ then (payment.recipient == me)
33+ else false)
34+ then (payment.sender == player)
35+ else false)
36+ then !(isDefined(payment.assetId))
37+ else false)
38+ then if ((timeout >= (height - startingHeight)))
39+ then {
40+ let serverChoiceWithSalt = payout.attachment
41+ let playerChoice = payment.attachment
42+ let s = size(playerChoice)
43+ let serverChoice = take(serverChoiceWithSalt, 1)
44+ let playerWins = if (if (if (if (if (if ((s >= 1))
45+ then (take(drop(playerChoice, 0), 1) == serverChoice)
46+ else false)
47+ then true
48+ else if ((s >= 2))
49+ then (take(drop(playerChoice, 1), 1) == serverChoice)
50+ else false)
51+ then true
52+ else if ((s >= 3))
53+ then (take(drop(playerChoice, 2), 1) == serverChoice)
54+ else false)
55+ then true
56+ else if ((s >= 4))
57+ then (take(drop(playerChoice, 3), 1) == serverChoice)
58+ else false)
59+ then true
60+ else if ((s >= 5))
61+ then (take(drop(playerChoice, 4), 1) == serverChoice)
62+ else false)
63+ then true
64+ else if ((s >= 6))
65+ then (take(drop(playerChoice, 5), 1) == serverChoice)
66+ else false
67+ if (if ((payout.recipient == (if (playerWins)
68+ then player
69+ else server)))
70+ then (keccak256(serverChoiceWithSalt) == serverChoiceHashBytes)
71+ else false)
72+ then (s == diceCount)
73+ else false
74+ }
75+ else (payout.recipient == player)
76+ else false
77+ case _ =>
78+ err
79+ }
80+ }
81+ else false
82+ case _ =>
83+ err
84+ }
85+ else false

github/deemru/w8io/169f3d6 
32.25 ms