tx · GDJ5MA3muvh6YA2SZwAahzjskaLQiHx46f1ruiCrdFPU

3N7cJVk8Bs6ABJaT7v2B5rADSM9KsgKUVUM:  -0.01000000 Waves

2019.02.19 20:52 [502373] smart account 3N7cJVk8Bs6ABJaT7v2B5rADSM9KsgKUVUM > SELF 0.00000000 Waves

{ "type": 13, "id": "GDJ5MA3muvh6YA2SZwAahzjskaLQiHx46f1ruiCrdFPU", "fee": 1000000, "feeAssetId": null, "timestamp": 1550598771907, "version": 1, "sender": "3N7cJVk8Bs6ABJaT7v2B5rADSM9KsgKUVUM", "senderPublicKey": "Gxs6DvcGKvFNgZudWT8XHqNLmEqrcqKQC53jRf4ViHdN", "proofs": [ "4pmxjQvRjTD7Bqcqoh9ytfJ316GyV9gKwtV976U6sYMFTTxGYqnDMtgnTzB8ENd8bXCk2NRWfP1LcoGfmgpqMfBn" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABXR4RmVlAAAAAAAAB6EgBAAAAAd0aW1lb3V0CQAAaAAAAAIAAAAAAAAAADwAAAAAAAAAABgEAAAACGxpZmVzcGFuAAAAAAAAAAPoBAAAAANlcnIJAAACAAAAAQIAAAAABAAAABVzZXJ2ZXJDaG9pY2VIYXNoQnl0ZXMJAAJZAAAAAQIAAAAsNW5td0tKQ0VUNXVLckVpTU1xalpGRmNFQ2JqY1ZxQThYeW9QWnFXZUF5d1AEAAAABnNlcnZlcgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM04xVEUxRG0yYUhTaFVtd252QlhFS1dyTTJaSEJOSEt0MWEEAAAABnBsYXllcgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM04xVEUxRG0yYUhTaFVtd252QlhFS1dyTTJaSEJOSEt0MWEEAAAADnN0YXJ0aW5nSGVpZ2h0AAAAAAAAB6pkBAAAABJpbml0aWFsU2VydmVyRnVuZHMAAAAAAaRNWeAEAAAACWRpY2VDb3VudAAAAA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BgMJAABnAAAAAgUAAAABcwAAAAAAAAAABgkAAAAAAAACCQAAyQAAAAIJAADKAAAAAgUAAAAMcGxheWVyQ2hvaWNlAAAAAAAAAAAFAAAAAAAAAAABBQAAAAxzZXJ2ZXJDaG9pY2UHAwMJAAAAAAAAAggFAAAABnBheW91dAAAAAlyZWNpcGllbnQDBQAAAApwbGF5ZXJXaW5zBQAAAAZwbGF5ZXIFAAAABnNlcnZlcgkAAAAAAAACCQAB9QAAAAEFAAAAFHNlcnZlckNob2ljZVdpdGhTYWx0BQAAABVzZXJ2ZXJDaG9pY2VIYXNoQnl0ZXMHCQAAAAAAAAIFAAAAAXMFAAAACWRpY2VDb3VudAcJAAAAAAAAAggFAAAABnBheW91dAAAAAlyZWNpcGllbnQFAAAABnBsYXllcgcFAAAAA2VycgcFAAAAA2Vycgc/UAsq", "chainId": 84, "height": 502373, "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("5nmwKJCET5uKrEiMMqjZFFcECbjcVqA8XyoPZqWeAywP")
9+let server = addressFromString("3N1TE1Dm2aHShUmwnvBXEKWrM2ZHBNHKt1a")
10+let player = addressFromString("3N1TE1Dm2aHShUmwnvBXEKWrM2ZHBNHKt1a")
11+let startingHeight = 502372
12+let initialServerFunds = 7051500000
13+let diceCount = 1
14+let bet = 1500000000
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/026f985 
20.60 ms