tx · 5nGS229WwFKNXH26mwtaYDqQPJUjwmkSh89gpca1NcmL

3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f:  -0.01400000 Waves

2018.09.28 19:04 [352029] smart account 3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f > SELF 0.00000000 Waves

{ "type": 13, "id": "5nGS229WwFKNXH26mwtaYDqQPJUjwmkSh89gpca1NcmL", "fee": 1400000, "feeAssetId": null, "timestamp": 1538150743096, "version": 1, "sender": "3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f", "senderPublicKey": "4BRdUi95rN89kRWamqTcb9Dj9pLpAQbjLt17MPxcgGhG", "proofs": [ "39wPg4ct4bDgVdQb9jxHKqGkjoAET3VTRYnwQaJMPtHeFq4wZEMGpPrn7nxykjHPfPhq1JaWZ4HvZKvNZBbCHdGT" ], "script": "base64:AQQAAAAJcmVkUHViS2V5AQAAACCcvkAYXSO2dto8Bjx/Z65U0bGrFY5cIkLHdfY5mFVSDwQAAAALZ3JlZW5QdWJLZXkBAAAAIPlfPeSXGejVVO8XgpF607z8UJ46ZmmLUq4Rq0R8IFM8BAAAAApibHVlUHViS2V5AQAAACA97ajD767lxQiKGSbQ60FmHM7Nfb7azWSBD/TaFp3/QAQAAAAHcmVkQWRkcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVGfSoosyZxu2GPr01RED4+I9rSQ9LlF8XgQAAAAJZ3JlZW5BZGRyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUeYFF8qf7pD+lzgJaCmi860XRkyZFP24HBAAAAAhibHVlQWRkcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEG1BP9MronfM5Ad2fldCE7DdHowHHByOQQAAAAIY29udHJhY3QIBQAAAAJ0eAAAAAZzZW5kZXIEAAAACXJlZFNpZ25lZAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAACXJ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rZXJzBQAAAA1ibHVlQXR0YWNrZXJzBAAAAAlkZWZlbmRlcnMJAABkAAAAAgkAAGQAAAACBQAAAAxyZWREZWZlbmRlcnMFAAAADmdyZWVuRGVmZW5kZXJzBQAAAA1ibHVlRGVmZW5kZXJzBAAAAARraW5nAwMDCQAAZgAAAAIFAAAADHJlZEF0dGFja2VycwAAAAAAAAAAAAUAAAAJcmVkU2lnbmVkBwYDCQAAZgAAAAIFAAAADmdyZWVuQXR0YWNrZXJzAAAAAAAAAAAABQAAAAtncmVlblNpZ25lZAcGAwkAAGYAAAACBQAAAA1ibHVlQXR0YWNrZXJzAAAAAAAAAAAABQAAAApibHVlU2lnbmVkBwQAAAAFbXVsdGkJAABpAAAAAgUAAAAJZnJvbVVuaXRzBQAAAAlhdHRhY2tlcnMDAwMFAAAABGtpbmcJAABmAAAAAgUAAAAJYXR0YWNrZXJzBQAAAAlkZWZlbmRlcnMHCQAAAAAAAAIFAAAADG5ld0Zyb21Vbml0cwAAAAAAAAAAAAcJAAAAAAAAAgUAAAAKbmV3VG9Vbml0cwkAAGgAAAACCQAAZQAAAAIFAAAACWF0dGFja2VycwUAAAAJZGVmZW5kZXJzBQAAAAVtdWx0aQcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA250eAUAAAAHJG1hdGNoMAYGn4ksVQ==", "chainId": 84, "height": 352029, "spentComplexity": 0 } View: original | compacted Prev: none Next: o6QfTWwrrjFqEYfxiiUb1zYbrLHttWFJx1K9vgps7dG Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 1 #-}
2+{-# 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 newFromUnits = ttx.data[0].value
19+ let newToUnits = ttx.data[1].value
20+ let turnCorrect = if (if (if (if (if (if (if (if (if (if (if (if ((fromKey == "country1"))
21+ then (toKey == "country2")
22+ else false)
23+ then true
24+ else if ((fromKey == "country2"))
25+ then if ((toKey == "country1"))
26+ then true
27+ else (toKey == "country3")
28+ else false)
29+ then true
30+ else if ((fromKey == "country3"))
31+ then if (if ((toKey == "country2"))
32+ then true
33+ else (toKey == "country4"))
34+ then true
35+ else (toKey == "country5")
36+ else false)
37+ then true
38+ else if ((fromKey == "country4"))
39+ then if ((toKey == "country3"))
40+ then true
41+ else (toKey == "country8")
42+ else false)
43+ then true
44+ else if ((fromKey == "country5"))
45+ then if ((toKey == "country3"))
46+ then true
47+ else (toKey == "country10")
48+ else false)
49+ then true
50+ else if ((fromKey == "country6"))
51+ then (toKey == "country7")
52+ else false)
53+ then true
54+ else if ((fromKey == "country7"))
55+ then if ((toKey == "country6"))
56+ then true
57+ else (toKey == "country8")
58+ else false)
59+ then true
60+ else if ((fromKey == "country8"))
61+ then if (if ((toKey == "country4"))
62+ then true
63+ else (toKey == "country7"))
64+ then true
65+ else (toKey == "country9")
66+ else false)
67+ then true
68+ else if ((fromKey == "country9"))
69+ then if ((toKey == "country8"))
70+ then true
71+ else (toKey == "country10")
72+ else false)
73+ then true
74+ else if ((fromKey == "country10"))
75+ then if (if ((toKey == "country5"))
76+ then true
77+ else (toKey == "country10"))
78+ then true
79+ else (toKey == "country11")
80+ else false)
81+ then true
82+ else if ((fromKey == "country11"))
83+ then if ((toKey == "country10"))
84+ then true
85+ else (toKey == "country12")
86+ else false)
87+ then true
88+ else if ((fromKey == "country12"))
89+ then (toKey == "country11")
90+ else false
91+ let fromUnits = extract(getInteger(contract, fromKey))
92+ let toUnits = extract(getInteger(contract, toKey))
93+ let redAttackers = (fromUnits % 100)
94+ let greenAttackers = (((fromUnits - redAttackers) / 100) % 100)
95+ let blueAttackers = (((fromUnits - greenAttackers) / 100) % 100)
96+ let redDefenders = (toUnits % 100)
97+ let greenDefenders = (((toUnits - redAttackers) / 100) % 100)
98+ let blueDefenders = (((toUnits - greenAttackers) / 100) % 100)
99+ let attackers = ((redAttackers + greenAttackers) + blueAttackers)
100+ let defenders = ((redDefenders + greenDefenders) + blueDefenders)
101+ let king = if (if (if ((redAttackers > 0))
102+ then redSigned
103+ else false)
104+ then true
105+ else if ((greenAttackers > 0))
106+ then greenSigned
107+ else false)
108+ then true
109+ else if ((blueAttackers > 0))
110+ then blueSigned
111+ else false
112+ let multi = (fromUnits / attackers)
113+ if (if (if (king)
114+ then (attackers > defenders)
115+ else false)
116+ then (newFromUnits == 0)
117+ else false)
118+ then (newToUnits == ((attackers - defenders) * multi))
119+ else false
120+ case ntx: TransferTransaction =>
121+ true
122+ case _ =>
123+ true
124+}

github/deemru/w8io/169f3d6 
25.68 ms