tx · Ae8hKfZGMRja7bg6DH6kL1i11UwGtouULCn9ERGabDok

3MxD12vyBsc12oNpaMoTHotR6KeSjmwJVkr:  -0.01000000 Waves

2019.02.19 15:51 [502092] smart account 3MxD12vyBsc12oNpaMoTHotR6KeSjmwJVkr > SELF 0.00000000 Waves

{ "type": 13, "id": "Ae8hKfZGMRja7bg6DH6kL1i11UwGtouULCn9ERGabDok", "fee": 1000000, "feeAssetId": null, "timestamp": 1550580702514, "version": 1, "sender": "3MxD12vyBsc12oNpaMoTHotR6KeSjmwJVkr", "senderPublicKey": "8WP25v1ft55VySBj1GtvMHWK9gsseFStoTgixe9Gez4G", "proofs": [ "5bwjzYFy6tWGrE11D58iurk2NiQVptnQBuSPGL1ZDyye42rHSgFSFX2v4wgkHa1XV7CyQ35epFkiSTqPm87sBVDk" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAABXR4RmVlAAAAAAAAB6EgBAAAAAd0aW1lb3V0AAAAAAAAAAWgBAAAAAhsaWZlc3BhbgAAAAAAAAAD6AQAAAADZXJyCQAAAgAAAAECAAAAAAQAAAAVc2VydmVyQ2hvaWNlSGFzaEJ5dGVzCQACWQAAAAECAAAALDVyR2hoS0dnRjd5Z1ZHRm92UW1UV3Q4d3drV3B6RlduTXRRYWZoQmNUTVBvBAAAAAZzZXJ2ZXIJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNcWV0ZDNKNjQxdWdSVFlkZEVDYlpHdFNMU3c2cm1VU2pxBAAAAAZwbGF5ZXIJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNONzk5cUJDOEtvZnZjcmtRcFlESFFaRXRXajFaNDVuQ3ZoBAAAABB0b3RhbFNlcnZlckZ1bmRzAAAAAAADk4cABAAAAA5zdGFydGluZ0hlaWdodAAAAAAAAAepSwQAAAAJZGljZUNvdW50AAAAAAAAAAACBAAAAANiZXQAAAAAAAHJw4ADCQAAZwAAAAIFAAAAB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DaG9pY2UAAAAAAAAAAAQAAAAAAAAAAAEFAAAADHNlcnZlckNob2ljZQcGAwkAAGcAAAACBQAAAAFzAAAAAAAAAAAGCQAAAAAAAAIJAADJAAAAAgkAAMoAAAACBQAAAAxwbGF5ZXJDaG9pY2UAAAAAAAAAAAUAAAAAAAAAAAEFAAAADHNlcnZlckNob2ljZQcDCQAAAAAAAAIIBQAAAAZwYXlvdXQAAAAJcmVjaXBpZW50AwUAAAAKcGxheWVyV2lucwUAAAAGcGxheWVyBQAAAAZzZXJ2ZXIJAAAAAAAAAgkAAfUAAAABBQAAABRzZXJ2ZXJDaG9pY2VXaXRoU2FsdAUAAAAVc2VydmVyQ2hvaWNlSGFzaEJ5dGVzBwkAAAAAAAACCAUAAAAGcGF5b3V0AAAACXJlY2lwaWVudAUAAAAGcGxheWVyBwUAAAADZXJyBwUAAAADZXJyB4doU9o=", "chainId": 84, "height": 502092, "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("5rGhhKGgF7ygVGFovQmTWt8wwkWpzFWnMtQafhBcTMPo")
9+let server = addressFromString("3Mqetd3J641ugRTYddECbZGtSLSw6rmUSjq")
10+let player = addressFromString("3N799qBC8KofvcrkQpYDHQZEtWj1Z45nCvh")
11+let totalServerFunds = 60000000
12+let startingHeight = 502091
13+let diceCount = 2
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 playerWins = if (if (if (if (if (if ((diceCount >= s))
47+ then if ((s >= 1))
48+ then (take(drop(playerChoice, 0), 1) == serverChoice)
49+ else false
50+ else false)
51+ then true
52+ else if ((s >= 2))
53+ then (take(drop(playerChoice, 1), 1) == serverChoice)
54+ else false)
55+ then true
56+ else if ((s >= 3))
57+ then (take(drop(playerChoice, 2), 1) == serverChoice)
58+ else false)
59+ then true
60+ else if ((s >= 4))
61+ then (take(drop(playerChoice, 3), 1) == serverChoice)
62+ else false)
63+ then true
64+ else if ((s >= 5))
65+ then (take(drop(playerChoice, 4), 1) == serverChoice)
66+ else false)
67+ then true
68+ else if ((s >= 6))
69+ then (take(drop(playerChoice, 5), 1) == serverChoice)
70+ else false
71+ if ((payout.recipient == (if (playerWins)
72+ then player
73+ else server)))
74+ then (keccak256(serverChoiceWithSalt) == serverChoiceHashBytes)
75+ else false
76+ }
77+ else (payout.recipient == player)
78+ else false
79+ case _ =>
80+ err
81+ }
82+ }
83+ else false
84+ case _ =>
85+ err
86+ }
87+ else false

github/deemru/w8io/026f985 
16.69 ms