tx · 26MW1iRJwxPPHD3Tnxiju4sAf4NihoCbrNaVkRyqZWQg

3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f:  -0.01400000 Waves

2018.09.28 19:24 [352050] smart account 3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f > SELF 0.00000000 Waves

{ "type": 13, "id": "26MW1iRJwxPPHD3Tnxiju4sAf4NihoCbrNaVkRyqZWQg", "fee": 1400000, "feeAssetId": null, "timestamp": 1538151853479, "version": 1, "sender": "3N9UZtJRvvoNgHCjQsWvDUtxiym7KFc7r6f", "senderPublicKey": "4BRdUi95rN89kRWamqTcb9Dj9pLpAQbjLt17MPxcgGhG", "proofs": [ "43ptmjN7ymyNhmdRsYyH1Prcc4QduTdNTwx6nnWjD2dcV1qFRd1e2UnacxrCsk2LQ63bBZ7RY6yPoUbwVuVyEKTN" ], "script": "base64:AQQAAAAJcmVkUHViS2V5AQAAACCcvkAYXSO2dto8Bjx/Z65U0bGrFY5cIkLHdfY5mFVSDwQAAAALZ3JlZW5QdWJLZXkBAAAAIPlfPeSXGejVVO8XgpF607z8UJ46ZmmLUq4Rq0R8IFM8BAAAAApibHVlUHViS2V5AQAAACA97ajD767lxQiKGSbQ60FmHM7Nfb7azWSBD/TaFp3/QAQAAAAHcmVkQWRkcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVGfSoosyZxu2GPr01RED4+I9rSQ9LlF8XgQAAAAJZ3JlZW5BZGRyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUeYFF8qf7pD+lzgJaCmi860XRkyZFP24HBAAAAAhibHVlQWRkcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEG1BP9MronfM5Ad2fldCE7DdHowHHByOQQAAAAIY29udHJhY3QIBQAAAAJ0eAAAAAZzZW5kZXIEAAAACXJlZFNpZ25lZAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAF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R0YWNrZXJzBQAAAA1ibHVlQXR0YWNrZXJzBAAAAAlkZWZlbmRlcnMJAABkAAAAAgkAAGQAAAACBQAAAAxyZWREZWZlbmRlcnMFAAAADmdyZWVuRGVmZW5kZXJzBQAAAA1ibHVlRGVmZW5kZXJzBAAAAARraW5nAwMDCQAAZgAAAAIFAAAADHJlZEF0dGFja2VycwAAAAAAAAAAAAUAAAAJcmVkU2lnbmVkBwYDCQAAZgAAAAIFAAAADmdyZWVuQXR0YWNrZXJzAAAAAAAAAAAABQAAAAtncmVlblNpZ25lZAcGAwkAAGYAAAACBQAAAA1ibHVlQXR0YWNrZXJzAAAAAAAAAAAABQAAAApibHVlU2lnbmVkBwQAAAAFbXVsdGkJAABpAAAAAgUAAAAJZnJvbVVuaXRzBQAAAAlhdHRhY2tlcnMDAwMFAAAABGtpbmcJAABmAAAAAgUAAAAJYXR0YWNrZXJzBQAAAAlkZWZlbmRlcnMHCQAAAAAAAAIFAAAADG5ld0Zyb21Vbml0cwAAAAAAAAAAAAcJAAAAAAAAAgUAAAAKbmV3VG9Vbml0cwkAAGgAAAACCQAAZQAAAAIFAAAACWF0dGFja2VycwUAAAAJZGVmZW5kZXJzBQAAAAVtdWx0aQcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA250eAUAAAAHJG1hdGNoMAYGcwh7jg==", "chainId": 84, "height": 352050, "spentComplexity": 0 } View: original | compacted Prev: GXMten5j6D7txbyLQcr1dA5cbZ2xB6vJenMQapF2zGpt Next: 7Qn5D9iGRHerXWJN7obbkvhtmQZfLHbZupYT9eE2Kukf Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let redPubKey = base58'BYrrqVpD5uuz7cndnPwuUxuYFUK6Bovu6yfoV8seY6Px'
44 let greenPubKey = base58'HnSkSntD7ihFgZpLNmHgdVnVmCYxJLC96eNbubTXsWju'
55 let bluePubKey = base58'5Ak4HQK3cnkwe6XVUXwpCYeSAARwruKyAmsmegePUPvo'
66 let redAddr = Address(base58'3MyP3hrK8SBvtXtggNWdsry8KuGdrv1sFrV')
77 let greenAddr = Address(base58'3MzzYQCC8Ks86exHaWV2VpaANbNLPRDunNJ')
88 let blueAddr = Address(base58'3MuuWYr3DyjEkncbNU1tUeFbyvcyZng9gz4')
99 let contract = tx.sender
1010 let redSigned = sigVerify(tx.bodyBytes, tx.proofs[0], redPubKey)
1111 let greenSigned = sigVerify(tx.bodyBytes, tx.proofs[0], greenPubKey)
1212 let blueSigned = sigVerify(tx.bodyBytes, tx.proofs[0], bluePubKey)
1313 match tx {
1414 case ttx: DataTransaction =>
1515 let dataSize = size(ttx.data)
1616 let fromKey = ttx.data[0].key
1717 let toKey = ttx.data[1].key
1818 let newFromUnits = ttx.data[0].value
1919 let newToUnits = ttx.data[1].value
2020 let turnCorrect = if (if (if (if (if (if (if (if (if (if (if (if ((fromKey == "country1"))
2121 then (toKey == "country2")
2222 else false)
2323 then true
2424 else if ((fromKey == "country2"))
2525 then if ((toKey == "country1"))
2626 then true
2727 else (toKey == "country3")
2828 else false)
2929 then true
3030 else if ((fromKey == "country3"))
3131 then if (if ((toKey == "country2"))
3232 then true
3333 else (toKey == "country4"))
3434 then true
3535 else (toKey == "country5")
3636 else false)
3737 then true
3838 else if ((fromKey == "country4"))
3939 then if ((toKey == "country3"))
4040 then true
4141 else (toKey == "country8")
4242 else false)
4343 then true
4444 else if ((fromKey == "country5"))
4545 then if ((toKey == "country3"))
4646 then true
4747 else (toKey == "country10")
4848 else false)
4949 then true
5050 else if ((fromKey == "country6"))
5151 then (toKey == "country7")
5252 else false)
5353 then true
5454 else if ((fromKey == "country7"))
5555 then if ((toKey == "country6"))
5656 then true
5757 else (toKey == "country8")
5858 else false)
5959 then true
6060 else if ((fromKey == "country8"))
6161 then if (if ((toKey == "country4"))
6262 then true
6363 else (toKey == "country7"))
6464 then true
6565 else (toKey == "country9")
6666 else false)
6767 then true
6868 else if ((fromKey == "country9"))
6969 then if ((toKey == "country8"))
7070 then true
7171 else (toKey == "country10")
7272 else false)
7373 then true
7474 else if ((fromKey == "country10"))
7575 then if (if ((toKey == "country5"))
7676 then true
7777 else (toKey == "country10"))
7878 then true
7979 else (toKey == "country11")
8080 else false)
8181 then true
8282 else if ((fromKey == "country11"))
8383 then if ((toKey == "country10"))
8484 then true
8585 else (toKey == "country12")
8686 else false)
8787 then true
8888 else if ((fromKey == "country12"))
8989 then (toKey == "country11")
9090 else false
9191 let fromUnits = extract(getInteger(contract, fromKey))
9292 let toUnits = extract(getInteger(contract, toKey))
9393 let redAttackers = (fromUnits % 100)
9494 let greenAttackers = (((fromUnits - redAttackers) / 100) % 100)
9595 let blueAttackers = (((fromUnits - greenAttackers) / 100) % 100)
9696 let redDefenders = (toUnits % 100)
9797 let greenDefenders = (((toUnits - redDefenders) / 100) % 100)
9898 let blueDefenders = (((toUnits - greenDefenders) / 100) % 100)
9999 let attackers = ((redAttackers + greenAttackers) + blueAttackers)
100100 let defenders = ((redDefenders + greenDefenders) + blueDefenders)
101101 let king = if (if (if ((redAttackers > 0))
102102 then redSigned
103103 else false)
104104 then true
105105 else if ((greenAttackers > 0))
106106 then greenSigned
107107 else false)
108108 then true
109109 else if ((blueAttackers > 0))
110110 then blueSigned
111111 else false
112112 let multi = (fromUnits / attackers)
113113 if (if (if (king)
114114 then (attackers > defenders)
115115 else false)
116116 then (newFromUnits == 0)
117117 else false)
118118 then (newToUnits == ((attackers - defenders) * multi))
119119 else false
120120 case ntx: TransferTransaction =>
121121 true
122122 case _ =>
123123 true
124124 }

github/deemru/w8io/026f985 
26.09 ms