tx · 5qLxbdzW9MmvR7qB6wWUK8DrCS3pLsaHJuPjcEZuHnaX

3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f:  -0.01400000 Waves

2018.09.29 18:13 [353462] smart account 3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f > SELF 0.00000000 Waves

{ "type": 13, "id": "5qLxbdzW9MmvR7qB6wWUK8DrCS3pLsaHJuPjcEZuHnaX", "fee": 1400000, "feeAssetId": null, "timestamp": 1538234030107, "version": 1, "sender": "3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f", "senderPublicKey": "4BRdUi95rN89kRWamqTcb9Dj9pLpAQbjLt17MPxcgGhG", "proofs": [ "74XGnEp9gpCJdtioxzf5nYjs5KQQkbShEQpNngdRDdmQMunbWZrJ4fHSmpQ85Dnxcis82HRVe1anLgSthAxEwdh" ], "script": "base64:AQa3b8tH", "chainId": 84, "height": 353462, "spentComplexity": 0 } View: original | compacted Prev: DBwuZ3GPJMyvVncAu5sSmCcHrhP98xjbcs4GYniyFxHT Next: 2XUAgax8HLwV4yTWjcrvTsJ4rPdmLGXGq3Q95SYnuqXe Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
3-let redPubKey = base58'BYrrqVpD5uuz7cndnPwuUxuYFUK6Bovu6yfoV8seY6Px'
4-let greenPubKey = base58'HnSkSntD7ihFgZpLNmHgdVnVmCYxJLC96eNbubTXsWju'
5-let bluePubKey = base58'5Ak4HQK3cnkwe6XVUXwpCYeSAARwruKyAmsmegePUPvo'
6-let redAddr = Address(base58'3MyP3hrK8SBvtXtggNWdsry8KuGdrv1sFrV')
7-let greenAddr = Address(base58'3MzzYQCC8Ks86exHaWV2VpaANbNLPRDunNJ')
8-let blueAddr = Address(base58'3MuuWYr3DyjEkncbNU1tUeFbyvcyZng9gz4')
9-let contract = tx.sender
10-let redSigned = sigVerify(tx.bodyBytes, tx.proofs[0], redPubKey)
11-let greenSigned = sigVerify(tx.bodyBytes, tx.proofs[0], greenPubKey)
12-let blueSigned = sigVerify(tx.bodyBytes, tx.proofs[0], bluePubKey)
13-match tx {
14- case ttx: DataTransaction =>
15- let dataSize = size(ttx.data)
16- let fromKey = ttx.data[0].key
17- let toKey = ttx.data[1].key
18- let turnToKey = ttx.data[2].key
19- let newFromUnits = ttx.data[0].value
20- let newToUnits = ttx.data[1].value
21- let turnToValue = ttx.data[2].value
22- let turnCorrect = if (if (if (if (if (if (if (if (if (if (if (if ((fromKey == "country1"))
23- then (toKey == "country2")
24- else false)
25- then true
26- else if ((fromKey == "country2"))
27- then if ((toKey == "country1"))
28- then true
29- else (toKey == "country3")
30- else false)
31- then true
32- else if ((fromKey == "country3"))
33- then if (if ((toKey == "country2"))
34- then true
35- else (toKey == "country4"))
36- then true
37- else (toKey == "country5")
38- else false)
39- then true
40- else if ((fromKey == "country4"))
41- then if ((toKey == "country3"))
42- then true
43- else (toKey == "country8")
44- else false)
45- then true
46- else if ((fromKey == "country5"))
47- then if ((toKey == "country3"))
48- then true
49- else (toKey == "country10")
50- else false)
51- then true
52- else if ((fromKey == "country6"))
53- then (toKey == "country7")
54- else false)
55- then true
56- else if ((fromKey == "country7"))
57- then if ((toKey == "country6"))
58- then true
59- else (toKey == "country8")
60- else false)
61- then true
62- else if ((fromKey == "country8"))
63- then if (if ((toKey == "country4"))
64- then true
65- else (toKey == "country7"))
66- then true
67- else (toKey == "country9")
68- else false)
69- then true
70- else if ((fromKey == "country9"))
71- then if ((toKey == "country8"))
72- then true
73- else (toKey == "country10")
74- else false)
75- then true
76- else if ((fromKey == "country10"))
77- then if (if ((toKey == "country5"))
78- then true
79- else (toKey == "country10"))
80- then true
81- else (toKey == "country11")
82- else false)
83- then true
84- else if ((fromKey == "country11"))
85- then if ((toKey == "country10"))
86- then true
87- else (toKey == "country12")
88- else false)
89- then true
90- else if ((fromKey == "country12"))
91- then (toKey == "country11")
92- else false
93- let turnFromKey = ("turn_" + fromKey)
94- let turnFromValue = extract(getInteger(contract, turnFromKey))
95- let turnAllowed = (turnFromValue == 0)
96- let locked = if ((("turn_" + toKey) == turnToKey))
97- then (turnToValue == 1)
98- else false
99- let fromUnits = extract(getInteger(contract, fromKey))
100- let toUnits = extract(getInteger(contract, toKey))
101- let redAttackers = (fromUnits % 100)
102- let greenAttackers = (((fromUnits - redAttackers) % 10000) / 100)
103- let blueAttackers = (((fromUnits - (greenAttackers * 100)) - redAttackers) / 10000)
104- let redDefenders = (toUnits % 100)
105- let greenDefenders = (((toUnits - redDefenders) % 10000) / 100)
106- let blueDefenders = ((((toUnits - (greenDefenders * 100)) - redDefenders) % 1000000) / 10000)
107- let whiteDefenders = ((((toUnits - (blueDefenders * 10000)) - (greenDefenders * 100)) - redDefenders) / 1000000)
108- let attackers = ((redAttackers + greenAttackers) + blueAttackers)
109- let defenders = ((redDefenders + greenDefenders) + blueDefenders)
110- let king = if (if (if ((redAttackers > 0))
111- then redSigned
112- else false)
113- then true
114- else if ((greenAttackers > 0))
115- then greenSigned
116- else false)
117- then true
118- else if ((blueAttackers > 0))
119- then blueSigned
120- else false
121- let multiAttackers = (fromUnits / attackers)
122- let multiDefenders = (toUnits / defenders)
123- let win = if (if (if (if (if (if (king)
124- then (multiAttackers != multiDefenders)
125- else false)
126- then (attackers > defenders)
127- else false)
128- then (newFromUnits == 0)
129- else false)
130- then (newToUnits == ((attackers - defenders) * multiAttackers))
131- else false)
132- then locked
133- else false)
134- then (dataSize == 3)
135- else false
136- let lost = if (if (if (if (if (king)
137- then (multiAttackers != multiDefenders)
138- else false)
139- then (defenders > attackers)
140- else false)
141- then (newFromUnits == 0)
142- else false)
143- then (newToUnits == ((defenders - attackers) * multiDefenders))
144- else false)
145- then (dataSize == 2)
146- else false
147- let draw = if (if (if (if (if (king)
148- then (multiAttackers != multiDefenders)
149- else false)
150- then (attackers == defenders)
151- else false)
152- then (newFromUnits == 0)
153- else false)
154- then (newToUnits == (((defenders + 1) - attackers) * multiDefenders))
155- else false)
156- then (dataSize == 2)
157- else false
158- let move = if (if (if (if (if (if (king)
159- then (multiAttackers == multiDefenders)
160- else false)
161- then (newFromUnits == 0)
162- else false)
163- then (10 >= (attackers + defenders))
164- else false)
165- then (newToUnits == ((attackers + defenders) * multiAttackers))
166- else false)
167- then locked
168- else false)
169- then (dataSize == 3)
170- else false
171- if (if (if (if (if (win)
172- then true
173- else lost)
174- then true
175- else draw)
176- then true
177- else move)
178- then turnAllowed
179- else false)
180- then true
181- else (dataSize == 12)
182- case ntx: TransferTransaction =>
183- true
184- case _ =>
185- true
186-}
3+true

github/deemru/w8io/169f3d6 
38.10 ms