tx · CXksnuG5MZjBFs1hmoNULx618MHV2FvZfPb5unh8q3Pm

3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP:  -0.05000000 Waves

2021.08.23 19:52 [1671235] smart account 3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP > SELF 0.00000000 Waves

{ "type": 13, "id": "CXksnuG5MZjBFs1hmoNULx618MHV2FvZfPb5unh8q3Pm", "fee": 5000000, "feeAssetId": null, "timestamp": 1629737537507, "version": 2, "chainId": 84, "sender": "3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP", "senderPublicKey": "Go3xxijfukFnawU9Jyy1yX4dSyxKT9SYT6Tp3g6iTAjt", "proofs": [ "4gKvqEq2Y36AdonTVKcL2N1ukiDwZPB565J5zbMPBPkftksLSGj1DLwb4wSCaFZwMnvvB8Ff3FEDsHxZ7qhU3QUu" ], "script": "base64:AAIFAAAAAAAAAgQIAhIDCgEBEgQKAgEBGggKAmExEgJXVRoICgJhMhICU1caCAoCYTMSAlNVGgcKAmE0EgFXGgcKAmE1EgFVGgcKAmE2EgFTGgsKAmE3EgVhZG1pbhoMCgJhOBIGc2NhbGU4Gh4KAmE5Ehhjb21taXNzaW9uU2NhbGVEZWxpbWl0ZXIaEAoCYjESCmNvbW1pc3Npb24aCgoCYjISBGZlZXMaCgoCYjMSBGZyb20aCAoCYjQSAnRvGgoKAmI1EgRhbW50GhYKAmI2EhBhbW91bnRXaXRob3V0RmVlGhMKAmI3Eg1hbW91bnRXaXRoRmVlGgcKAmI4EgFpGgkKAmI5EgNtaW4aCQoCYzESA3BtdBoJCgJjMhIDZTFhGgkKAmMzEgNlMWIaCQoCYzQSA2UyYRoJCgJjNRIDZTJiGgkKAmM2EgNlM2EaCQoCYzcSA2UzYhoJCgJjOBIDYmJ1GgkKAmM5EgNiYncaCQoCZDESA2JicxoKCgJkMhIEZGlmdRoKCgJkMxIEZGlmcxoKCgJkNBIEZGlmdxoLCgJkNRIFc3dhcDEaCwoCZDYSBWRpZ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mljdAkAAAIAAAABAgAAAAZzdHJpY3QJAAACAAAAAQIAAAAGc3RyaWN0CQAAAgAAAAECAAAABnN0cmljdAkAAAIAAAABAgAAAAZzdHJpY3QJAAACAAAAAQIAAAAGc3RyaWN0CQAAAgAAAAECAAAABlN0cmljdAAAAAEAAAACZTMBAAAAAmU0AAAAAAkAAfQAAAADCAUAAAACZTMAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJlMwAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJlMwAAAA9zZW5kZXJQdWJsaWNLZXnTkCu3", "height": 1671235, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6YyKZtXX4M6yXYzuG4uPs8V6yMiuJKE2ib8m1mn7t6Ze Next: none Diff:
OldNewDifferences
8989 let diffw = (assetBalance(this, W) - bbw)
9090 if ((diffw == diffw))
9191 then if ((diffw > min))
92- then [ScriptTransfer(i.caller, diffw, pmt.assetId), StringEntry("debug", ((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))]
92+ then [ScriptTransfer(i.caller, (amnt + diffw), pmt.assetId), StringEntry("debug", ((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))]
9393 else throw(("diffw" + toString(diffw)))
9494 else throw("Strict value is not equal to itself.")
9595 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let WU = addressFromStringValue(value("3NDD3ifAC17cLzxuYqsgXDRY9DTQ5BqmvwL"))
55
66 let SW = addressFromStringValue(value("3NAzES7pSjfoHsKNumP5HRtSt3qadbqnHip"))
77
88 let SU = addressFromStringValue(value("3MrBtdped4oUFs1BvLNu53Dm1AMGiTHkT9B"))
99
1010 let W = base58'3Tg4GRpKeek5wWAQRJKH1ucjMuKNom3f2h67WNNu6xVS'
1111
1212 let U = base58'gAAmMoquySsX6q5EmzciFfB8RecAhZR9W1HKNntNekL'
1313
1414 let S = base58'89G3XEYzMSztS6RPN5h2da7j43r4zgKufReZWn1MqX7g'
1515
1616 let admin = addressFromStringValue("3N97G98bPF5ghnZ1iMmQ7tMH6MBsNZnS272")
1717
1818 let scale8 = 100000000
1919
2020 let commissionScaleDelimiter = 1000000
2121
2222 let commission = 3000
2323
2424 func fees (from,to,amnt) = {
2525 let amountWithoutFee = fraction(to, amnt, (amnt + from))
2626 let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
2727 (amountWithFee - 1)
2828 }
2929
3030
3131 @Callable(i)
3232 func call1 (min) = if ((i.caller != admin))
3333 then throw("only admin")
3434 else {
3535 let pmt = i.payments[0]
3636 let amnt = pmt.amount
3737 let e1a = getIntegerValue(WU, "A_asset_balance")
3838 if ((e1a == e1a))
3939 then {
4040 let e1b = getIntegerValue(WU, "B_asset_balance")
4141 if ((e1b == e1b))
4242 then {
4343 let e2a = getIntegerValue(SU, "A_asset_balance")
4444 if ((e2a == e2a))
4545 then {
4646 let e2b = getIntegerValue(SU, "B_asset_balance")
4747 if ((e2b == e2b))
4848 then {
4949 let e3a = getIntegerValue(SW, "A_asset_balance")
5050 if ((e3a == e3a))
5151 then {
5252 let e3b = getIntegerValue(SW, "B_asset_balance")
5353 if ((e3b == e3b))
5454 then {
5555 let bbu = assetBalance(this, U)
5656 if ((bbu == bbu))
5757 then {
5858 let bbw = assetBalance(this, W)
5959 if ((bbw == bbw))
6060 then {
6161 let bbs = assetBalance(this, S)
6262 if ((bbs == bbs))
6363 then {
6464 let difu = fees(e1a, e1b, amnt)
6565 if ((difu == difu))
6666 then {
6767 let difs = fees(e2b, e2a, difu)
6868 if ((difs == difs))
6969 then {
7070 let difw = fees(e3a, e3b, difs)
7171 if ((difw == difw))
7272 then if ((difw > (amnt + min)))
7373 then {
7474 let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, amnt)])
7575 if ((swap1 == swap1))
7676 then {
7777 let diffu = (assetBalance(this, U) - bbu)
7878 if ((diffu == diffu))
7979 then {
8080 let swap2 = invoke(SU, "exchange", [1], [AttachedPayment(U, diffu)])
8181 if ((swap2 == swap2))
8282 then {
8383 let diffs = (assetBalance(this, S) - bbs)
8484 if ((diffs == diffs))
8585 then {
8686 let swap3 = invoke(SW, "exchange", [1], [AttachedPayment(S, diffs)])
8787 if ((swap3 == swap3))
8888 then {
8989 let diffw = (assetBalance(this, W) - bbw)
9090 if ((diffw == diffw))
9191 then if ((diffw > min))
92- then [ScriptTransfer(i.caller, diffw, pmt.assetId), StringEntry("debug", ((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))]
92+ then [ScriptTransfer(i.caller, (amnt + diffw), pmt.assetId), StringEntry("debug", ((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))]
9393 else throw(("diffw" + toString(diffw)))
9494 else throw("Strict value is not equal to itself.")
9595 }
9696 else throw("Strict value is not equal to itself.")
9797 }
9898 else throw("Strict value is not equal to itself.")
9999 }
100100 else throw("Strict value is not equal to itself.")
101101 }
102102 else throw("Strict value is not equal to itself.")
103103 }
104104 else throw("Strict value is not equal to itself.")
105105 }
106106 else throw(((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))
107107 else throw("Strict value is not equal to itself.")
108108 }
109109 else throw("Strict value is not equal to itself.")
110110 }
111111 else throw("Strict value is not equal to itself.")
112112 }
113113 else throw("Strict value is not equal to itself.")
114114 }
115115 else throw("Strict value is not equal to itself.")
116116 }
117117 else throw("Strict value is not equal to itself.")
118118 }
119119 else throw("Strict value is not equal to itself.")
120120 }
121121 else throw("Strict value is not equal to itself.")
122122 }
123123 else throw("Strict value is not equal to itself.")
124124 }
125125 else throw("Strict value is not equal to itself.")
126126 }
127127 else throw("Strict value is not equal to itself.")
128128 }
129129 else throw("Strict value is not equal to itself.")
130130 }
131131
132132
133133
134134 @Callable(i)
135135 func call2 (amnt,min) = if ((i.caller != admin))
136136 then throw("only admin")
137137 else {
138138 let bbu = assetBalance(this, U)
139139 let bbw = assetBalance(this, W)
140140 let bbs = assetBalance(this, S)
141141 if (if (if ((bbu == bbu))
142142 then (bbw == bbw)
143143 else false)
144144 then (bbs == bbs)
145145 else false)
146146 then {
147147 let swap1 = invoke(SW, "exchange", [1], [AttachedPayment(W, (amnt * scale8))])
148148 if ((swap1 == swap1))
149149 then {
150150 let diffs = (assetBalance(this, S) - bbs)
151151 if ((diffs == diffs))
152152 then {
153153 let swap2 = invoke(SU, "exchange", [1], [AttachedPayment(S, diffs)])
154154 if ((swap2 == swap2))
155155 then {
156156 let diffu = (assetBalance(this, U) - bbu)
157157 if ((diffu == diffu))
158158 then {
159159 let swap3 = invoke(WU, "exchange", [1], [AttachedPayment(U, diffu)])
160160 if ((swap3 == swap3))
161161 then {
162162 let diffw = (assetBalance(this, W) - bbw)
163163 if ((diffw == diffw))
164164 then if ((diffw > min))
165165 then {
166166 let ok = "ok"
167167 [IntegerEntry("debug", diffw)]
168168 }
169169 else throw(toString(diffw))
170170 else throw("strict")
171171 }
172172 else throw("strict")
173173 }
174174 else throw("strict")
175175 }
176176 else throw("strict")
177177 }
178178 else throw("strict")
179179 }
180180 else throw("strict")
181181 }
182182 else throw("Strict")
183183 }
184184
185185
186186 @Verifier(tx)
187187 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
188188

github/deemru/w8io/169f3d6 
79.58 ms