tx · 77YZgQ5fddGDiqeUnqX28Z7zZDTEbCfP9n9CPyvLpM84

3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f:  -0.01400000 Waves

2018.10.03 17:20 [359322] smart account 3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f > SELF 0.00000000 Waves

{ "type": 13, "id": "77YZgQ5fddGDiqeUnqX28Z7zZDTEbCfP9n9CPyvLpM84", "fee": 1400000, "feeAssetId": null, "timestamp": 1538576431610, "version": 1, "sender": "3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f", "senderPublicKey": "4BRdUi95rN89kRWamqTcb9Dj9pLpAQbjLt17MPxcgGhG", "proofs": [ "N4XoNnx6mzGLQeEh8bR8YouAh5jRKxXRdQDLNSgNNVkVruHcNJJ8kR2o5G8TZxzsi3LECsG3T4bnzA54qX4rUH1" ], "script": "base64:AQQAAAAJcmVkUHViS2V5AQAAACCcvkAYXSO2dto8Bjx/Z65U0bGrFY5cIkLHdfY5mFVSDwQAAAALZ3JlZW5QdWJLZXkBAAAAIPlfPeSXGejVVO8XgpF607z8UJ46ZmmLUq4Rq0R8IFM8BAAAAApibHVlUHViS2V5AQAAACA97ajD767lxQiKGSbQ60FmHM7Nfb7azWSBD/TaFp3/QAQAAAAHcmVkQWRkcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVGfSoosyZxu2GPr01RED4+I9rSQ9LlF8XgQAAAAJZ3JlZW5BZGRyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUeYFF8qf7pD+lzgJaCmi860XRkyZFP24HBAAAAAhibHVlQWRkcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEG1BP9MronfM5Ad2fldCE7DdHowHHByOQQAAAAIY29udHJhY3QIBQAAAAJ0eAAAAAZzZW5kZXIEAAAACXJlZFNpZ25lZAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAA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AAABGtpbmcJAAAAAAAAAgUAAAAObXVsdGlBdHRhY2tlcnMFAAAADm11bHRpRGVmZW5kZXJzBwkAAAAAAAACBQAAAAxuZXdGcm9tVW5pdHMAAAAAAAAAAAAHCQAAZwAAAAIAAAAAAAAAAAoJAABkAAAAAgUAAAAJYXR0YWNrZXJzBQAAAAlkZWZlbmRlcnMHCQAAAAAAAAIFAAAACm5ld1RvVW5pdHMJAABoAAAAAgkAAGQAAAACBQAAAAlhdHRhY2tlcnMFAAAACWRlZmVuZGVycwUAAAAObXVsdGlBdHRhY2tlcnMHBQAAAAZsb2NrZWQHAwMDAwMDBQAAAAN3aW4GBQAAAARsb3N0BgUAAAAEZHJhdwYFAAAABG1vdmUFAAAAC3R1cm5BbGxvd2VkBwkAAAAAAAACBQAAAAhkYXRhU2l6ZQAAAAAAAAAAAwcGCQAAAAAAAAIFAAAACGRhdGFTaXplAAAAAAAAAAAMAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAANudHgFAAAAByRtYXRjaDAGBndwb9k=", "chainId": 84, "height": 359322, "spentComplexity": 0 } View: original | compacted Prev: DTQELh3usLhLdmzyoKJ1kbBu855GG6yXy6CY21ubGE76 Next: GM1Up9EHbhfQaazDjd9uS9o9MLZsM3eyYPbFBSLhhK16 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
3-true
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 = ((height - 5) > turnFromValue)
96+ let oldTurnToKey = ("turn_" + toKey)
97+ let oldTurnToValue = extract(getInteger(contract, oldTurnToKey))
98+ let locked = if ((("turn_" + toKey) == turnToKey))
99+ then (turnToValue == height)
100+ else false
101+ let lockNotChanged = if ((("turn_" + toKey) == turnToKey))
102+ then (turnToValue == oldTurnToValue)
103+ else false
104+ let fromUnits = extract(getInteger(contract, fromKey))
105+ let toUnits = extract(getInteger(contract, toKey))
106+ let redAttackers = (fromUnits % 100)
107+ let greenAttackers = (((fromUnits - redAttackers) % 10000) / 100)
108+ let blueAttackers = (((fromUnits - (greenAttackers * 100)) - redAttackers) / 10000)
109+ let redDefenders = (toUnits % 100)
110+ let greenDefenders = (((toUnits - redDefenders) % 10000) / 100)
111+ let blueDefenders = ((((toUnits - (greenDefenders * 100)) - redDefenders) % 1000000) / 10000)
112+ let whiteDefenders = ((((toUnits - (blueDefenders * 10000)) - (greenDefenders * 100)) - redDefenders) / 1000000)
113+ let unlimitedAttackers = (((redAttackers + greenAttackers) + blueAttackers) + (height - turnFromValue))
114+ let unlimitedDefenders = (((redDefenders + greenDefenders) + blueDefenders) + (height - oldTurnToValue))
115+ let attackers = if ((unlimitedAttackers >= 10))
116+ then 10
117+ else unlimitedAttackers
118+ let defenders = if ((unlimitedDefenders >= 10))
119+ then 10
120+ else unlimitedDefenders
121+ let king = if (if (if ((redAttackers > 0))
122+ then redSigned
123+ else false)
124+ then true
125+ else if ((greenAttackers > 0))
126+ then greenSigned
127+ else false)
128+ then true
129+ else if ((blueAttackers > 0))
130+ then blueSigned
131+ else false
132+ let multiAttackers = if ((attackers > 0))
133+ then (fromUnits / attackers)
134+ else 0
135+ let multiDefenders = if ((defenders > 0))
136+ then (toUnits / defenders)
137+ else 0
138+ let win = if (if (if (if (if (king)
139+ then (multiAttackers != multiDefenders)
140+ else false)
141+ then (attackers > defenders)
142+ else false)
143+ then (newFromUnits == 0)
144+ else false)
145+ then (newToUnits == ((attackers - defenders) * multiAttackers))
146+ else false)
147+ then locked
148+ else false
149+ let lost = if (if (if (if (if (king)
150+ then (multiAttackers != multiDefenders)
151+ else false)
152+ then (defenders > attackers)
153+ else false)
154+ then (newFromUnits == 0)
155+ else false)
156+ then (newToUnits == ((defenders - attackers) * multiDefenders))
157+ else false)
158+ then lockNotChanged
159+ else false
160+ let draw = if (if (if (if (if (king)
161+ then (multiAttackers != multiDefenders)
162+ else false)
163+ then (attackers == defenders)
164+ else false)
165+ then (newFromUnits == 0)
166+ else false)
167+ then (newToUnits == (((defenders + 1) - attackers) * multiDefenders))
168+ else false)
169+ then lockNotChanged
170+ else false
171+ let move = if (if (if (if (if (king)
172+ then (multiAttackers == multiDefenders)
173+ else false)
174+ then (newFromUnits == 0)
175+ else false)
176+ then (10 >= (attackers + defenders))
177+ else false)
178+ then (newToUnits == ((attackers + defenders) * multiAttackers))
179+ else false)
180+ then locked
181+ else false
182+ if (if (if (if (if (if (win)
183+ then true
184+ else lost)
185+ then true
186+ else draw)
187+ then true
188+ else move)
189+ then turnAllowed
190+ else false)
191+ then (dataSize == 3)
192+ else false)
193+ then true
194+ else (dataSize == 12)
195+ case ntx: TransferTransaction =>
196+ true
197+ case _ =>
198+ true
199+}

github/deemru/w8io/169f3d6 
42.10 ms