tx · 85ttDG9by84mZrV5zN31Rn8MzRppnxSYJEABEdXpqKvb

3Mqe9CUxXYa7Wk5wXwXUMPg6n8MCrwK52uq:  -0.01000000 Waves

2019.02.19 17:50 [502194] smart account 3Mqe9CUxXYa7Wk5wXwXUMPg6n8MCrwK52uq > SELF 0.00000000 Waves

{ "type": 13, "id": "85ttDG9by84mZrV5zN31Rn8MzRppnxSYJEABEdXpqKvb", "fee": 1000000, "feeAssetId": null, "timestamp": 1550587812265, "version": 1, "sender": "3Mqe9CUxXYa7Wk5wXwXUMPg6n8MCrwK52uq", "senderPublicKey": "HNPM43RvEaC2TbG1YivwBaER55cgN57TZLXFdnAMYxwe", "proofs": [ "k8JiuarjoRmmwRtCkuJcDDMNVRpsfGALqxMudFG1ZXoLp44ZRwtR84ZuPaLsbdnzy1psduWHGo8crAjdVn3kUdY" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABXR4RmVlAAAAAAAAB6EgBAAAAAd0aW1lb3V0AAAAAAAAAAWgBAAAAAhsaWZlc3BhbgAAAAAAAAAD6AQAAAADZXJyCQAAAgAAAAECAAAAAAQAAAAVc2VydmVyQ2hvaWNlSGFzaEJ5dGVzCQACWQAAAAECAAAALDlab3ZDZDEzVGJqZ2RyOXhEOVVtWThCNGRQb201Qk5pRVVvVWhObnd1NUNwBAAAAAZzZXJ2ZXIJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNemF6VHlYOEZNSkVDcmtRb3p3UWF6WDdGTEZ0dFlmakgyBAAAAAZwbGF5ZXIJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNOQ1k4c1FpY04zeXVDWjdQVFhDamF3OUN0MzF4aDJFU0c1BAAAABB0b3RhbFNlcnZlckZ1bmRzAAAAAAADk4cABAAAAA5zdGFydGluZ0hlaWdodAAAAAAAAAepsgQAAAAJZGljZUNvdW50AAAAAAAAAAABBAAAAANiZXQAAAAAAAHJw4ADCQAAZ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heWVyQ2hvaWNlAAAAAAAAAAABAAAAAAAAAAABBQAAAAxzZXJ2ZXJDaG9pY2UHBgMJAABnAAAAAgUAAAABcwAAAAAAAAAAAwkAAAAAAAACCQAAyQAAAAIJAADKAAAAAgUAAAAMcGxheWVyQ2hvaWNlAAAAAAAAAAACAAAAAAAAAAABBQAAAAxzZXJ2ZXJDaG9pY2UHBgMJAABnAAAAAgUAAAABcwAAAAAAAAAABAkAAAAAAAACCQAAyQAAAAIJAADKAAAAAgUAAAAMcGxheWVyQ2hvaWNlAAAAAAAAAAADAAAAAAAAAAABBQAAAAxzZXJ2ZXJDaG9pY2UHBgMJAABnAAAAAgUAAAABcwAAAAAAAAAABQkAAAAAAAACCQAAyQAAAAIJAADKAAAAAgUAAAAMcGxheWVyQ2hvaWNlAAAAAAAAAAAEAAAAAAAAAAABBQAAAAxzZXJ2ZXJDaG9pY2UHBgMJAABnAAAAAgUAAAABcwAAAAAAAAAABgkAAAAAAAACCQAAyQAAAAIJAADKAAAAAgUAAAAMcGxheWVyQ2hvaWNlAAAAAAAAAAAFAAAAAAAAAAABBQAAAAxzZXJ2ZXJDaG9pY2UHAwkAAAAAAAACCAUAAAAGcGF5b3V0AAAACXJlY2lwaWVudAMFAAAACnBsYXllcldpbnMFAAAABnBsYXllcgUAAAAGc2VydmVyCQAAAAAAAAIJAAH1AAAAAQUAAAAUc2VydmVyQ2hvaWNlV2l0aFNhbHQFAAAAFXNlcnZlckNob2ljZUhhc2hCeXRlcwcJAAAAAAAAAggFAAAABnBheW91dAAAAAlyZWNpcGllbnQFAAAABnBsYXllcgcFAAAAA2VycgcFAAAAA2VycgeuGgFS", "chainId": 84, "height": 502194, "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 = 1440
6+let lifespan = 1000
7+let err = throw("")
8+let serverChoiceHashBytes = fromBase58String("9ZovCd13Tbjgdr9xD9UmY8B4dPom5BNiEUoUhNnwu5Cp")
9+let server = addressFromString("3MzazTyX8FMJECrkQozwQazX7FLFttYfjH2")
10+let player = addressFromString("3NCY8sQicN3yuCZ7PTXCjaw9Ct31xh2ESG5")
11+let totalServerFunds = 60000000
12+let startingHeight = 502194
13+let diceCount = 1
14+let bet = 30000000
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 (if ((timeout >= (height - startingHeight)))
39+ then (wavesBalance(me) >= totalServerFunds)
40+ else false)
41+ then {
42+ let serverChoiceWithSalt = payout.attachment
43+ let playerChoice = payment.attachment
44+ let s = size(playerChoice)
45+ let serverChoice = take(serverChoiceWithSalt, 1)
46+ let serverChoiceValid = if (if (if (if (if ((serverChoice == toBytes("1")))
47+ then true
48+ else (serverChoice == toBytes("2")))
49+ then true
50+ else (serverChoice == toBytes("3")))
51+ then true
52+ else (serverChoice == toBytes("4")))
53+ then true
54+ else (serverChoice == toBytes("5")))
55+ then true
56+ else (serverChoice == toBytes("6"))
57+ let playerWins = if (if (if (if (if (if (if (!(serverChoiceValid))
58+ then true
59+ else (diceCount >= s))
60+ then if ((s >= 1))
61+ then (take(drop(playerChoice, 0), 1) == serverChoice)
62+ else false
63+ else false)
64+ then true
65+ else if ((s >= 2))
66+ then (take(drop(playerChoice, 1), 1) == serverChoice)
67+ else false)
68+ then true
69+ else if ((s >= 3))
70+ then (take(drop(playerChoice, 2), 1) == serverChoice)
71+ else false)
72+ then true
73+ else if ((s >= 4))
74+ then (take(drop(playerChoice, 3), 1) == serverChoice)
75+ else false)
76+ then true
77+ else if ((s >= 5))
78+ then (take(drop(playerChoice, 4), 1) == serverChoice)
79+ else false)
80+ then true
81+ else if ((s >= 6))
82+ then (take(drop(playerChoice, 5), 1) == serverChoice)
83+ else false
84+ if ((payout.recipient == (if (playerWins)
85+ then player
86+ else server)))
87+ then (keccak256(serverChoiceWithSalt) == serverChoiceHashBytes)
88+ else false
89+ }
90+ else (payout.recipient == player)
91+ else false
92+ case _ =>
93+ err
94+ }
95+ }
96+ else false
97+ case _ =>
98+ err
99+ }
100+ else false

github/deemru/w8io/169f3d6 
24.33 ms