tx · 96JSLTbeBoKDFPw3ZBCdBvewgB2fX28d62cxVbb17sEH

3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP:  -0.05000000 Waves

2021.08.23 19:41 [1671228] smart account 3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP > SELF 0.00000000 Waves

{ "type": 13, "id": "96JSLTbeBoKDFPw3ZBCdBvewgB2fX28d62cxVbb17sEH", "fee": 5000000, "feeAssetId": null, "timestamp": 1629736946231, "version": 2, "chainId": 84, "sender": "3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP", "senderPublicKey": "Go3xxijfukFnawU9Jyy1yX4dSyxKT9SYT6Tp3g6iTAjt", "proofs": [ "NvZxLUnQj4VDJ8EaN5J8PboxtYECG2ngqH6QY88jztuQsBDFxtHhPzWxQya19kbZK9DRMKU7P9CneuWBzWT1Jmg" ], "script": "base64:AAIFAAAAAAAAAgQIAhIDCgEBEgQKAgEBGggKAmExEgJXVRoICgJhMhICU1caCAoCYTMSAlNVGgcKAmE0EgFXGgcKAmE1EgFVGgcKAmE2EgFTGgsKAmE3EgVhZG1pbhoMCgJhOBIGc2NhbGU4Gh4KAmE5Ehhjb21taXNzaW9uU2NhbGVEZWxpbWl0ZXIaEAoCYjESCmNvbW1pc3Npb24aCgoCYjISBGZlZXMaCgoCYjMSBGZyb20aCAoCYjQSAnRvGgoKAmI1EgRhbW50GhYKAmI2EhBhbW91bnRXaXRob3V0RmVlGhMKAmI3Eg1hbW91bnRXaXRoRmVlGgcKAmI4EgFpGgkKAmI5EgNtaW4aCQoCYzESA3BtdBoJCgJjMhIDZTFhGgkKAmMzEgNlMWIaCQoCYzQSA2UyYRoJCgJjNRIDZTJiGgkKAmM2EgNlM2EaCQoCYzcSA2UzYhoJCgJjOBIDYmJ1GgkKAmM5EgNiYncaCQoCZDESA2JicxoKCgJkMhIEZGlmdRoKCgJkMxIEZGlmcxoKCgJkNBIEZGlmdxoLCgJkNRIFc3dhcDEaCwoCZDYSBWRpZmZ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aWN0CQAAAgAAAAECAAAABnN0cmljdAkAAAIAAAABAgAAAAZzdHJpY3QJAAACAAAAAQIAAAAGc3RyaWN0CQAAAgAAAAECAAAABnN0cmljdAkAAAIAAAABAgAAAAZTdHJpY3QAAAABAAAAAmUzAQAAAAJlNAAAAAAJAAH0AAAAAwgFAAAAAmUzAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACZTMAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACZTMAAAAPc2VuZGVyUHVibGljS2V58cFcyg==", "height": 1671228, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 71sAFQK4iHoqYqzPGHyaNJUThHUo5UzTmhTU6Eduyn3r Next: GKB8eapyU9gonXmHRYXgrkjQDMYP9DKRjwwnbsYtCzu2 Diff:
OldNewDifferences
2929
3030
3131 @Callable(i)
32-func call1 (amnt,min) = if ((i.caller != admin))
32+func call1 (min) = if ((i.caller != admin))
3333 then throw("only admin")
3434 else {
35+ let pmt = i.payments[0]
36+ let amnt = pmt.amount
3537 let e1a = getIntegerValue(WU, "A_asset_balance")
3638 if ((e1a == e1a))
3739 then {
5961 let bbs = assetBalance(this, S)
6062 if ((bbs == bbs))
6163 then {
62- let difu = fees(e1a, e1b, (amnt * scale8))
64+ let difu = fees(e1a, e1b, amnt)
6365 if ((difu == difu))
6466 then {
6567 let difs = fees(e2b, e2a, difu)
6769 then {
6870 let difw = fees(e3a, e3b, difs)
6971 if ((difw == difw))
70- then if ((difw > ((amnt * scale8) + min)))
72+ then if ((difw > (amnt + min)))
7173 then {
72- let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (amnt * scale8))])
74+ let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, amnt)])
7375 if ((swap1 == swap1))
7476 then {
7577 let diffu = (assetBalance(this, U) - bbu)
8789 let diffw = (assetBalance(this, W) - bbw)
8890 if ((diffw == diffw))
8991 then if ((diffw > min))
90- then [StringEntry("debug", ((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))]
92+ then [ScriptTransfer(i.caller, 0, unit), StringEntry("debug", ((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))]
9193 else throw(("diffw" + toString(diffw)))
9294 else throw("Strict value is not equal to itself.")
9395 }
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)
32-func call1 (amnt,min) = if ((i.caller != admin))
32+func call1 (min) = if ((i.caller != admin))
3333 then throw("only admin")
3434 else {
35+ let pmt = i.payments[0]
36+ let amnt = pmt.amount
3537 let e1a = getIntegerValue(WU, "A_asset_balance")
3638 if ((e1a == e1a))
3739 then {
3840 let e1b = getIntegerValue(WU, "B_asset_balance")
3941 if ((e1b == e1b))
4042 then {
4143 let e2a = getIntegerValue(SU, "A_asset_balance")
4244 if ((e2a == e2a))
4345 then {
4446 let e2b = getIntegerValue(SU, "B_asset_balance")
4547 if ((e2b == e2b))
4648 then {
4749 let e3a = getIntegerValue(SW, "A_asset_balance")
4850 if ((e3a == e3a))
4951 then {
5052 let e3b = getIntegerValue(SW, "B_asset_balance")
5153 if ((e3b == e3b))
5254 then {
5355 let bbu = assetBalance(this, U)
5456 if ((bbu == bbu))
5557 then {
5658 let bbw = assetBalance(this, W)
5759 if ((bbw == bbw))
5860 then {
5961 let bbs = assetBalance(this, S)
6062 if ((bbs == bbs))
6163 then {
62- let difu = fees(e1a, e1b, (amnt * scale8))
64+ let difu = fees(e1a, e1b, amnt)
6365 if ((difu == difu))
6466 then {
6567 let difs = fees(e2b, e2a, difu)
6668 if ((difs == difs))
6769 then {
6870 let difw = fees(e3a, e3b, difs)
6971 if ((difw == difw))
70- then if ((difw > ((amnt * scale8) + min)))
72+ then if ((difw > (amnt + min)))
7173 then {
72- let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (amnt * scale8))])
74+ let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, amnt)])
7375 if ((swap1 == swap1))
7476 then {
7577 let diffu = (assetBalance(this, U) - bbu)
7678 if ((diffu == diffu))
7779 then {
7880 let swap2 = invoke(SU, "exchange", [1], [AttachedPayment(U, diffu)])
7981 if ((swap2 == swap2))
8082 then {
8183 let diffs = (assetBalance(this, S) - bbs)
8284 if ((diffs == diffs))
8385 then {
8486 let swap3 = invoke(SW, "exchange", [1], [AttachedPayment(S, diffs)])
8587 if ((swap3 == swap3))
8688 then {
8789 let diffw = (assetBalance(this, W) - bbw)
8890 if ((diffw == diffw))
8991 then if ((diffw > min))
90- then [StringEntry("debug", ((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))]
92+ then [ScriptTransfer(i.caller, 0, unit), StringEntry("debug", ((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))]
9193 else throw(("diffw" + toString(diffw)))
9294 else throw("Strict value is not equal to itself.")
9395 }
9496 else throw("Strict value is not equal to itself.")
9597 }
9698 else throw("Strict value is not equal to itself.")
9799 }
98100 else throw("Strict value is not equal to itself.")
99101 }
100102 else throw("Strict value is not equal to itself.")
101103 }
102104 else throw("Strict value is not equal to itself.")
103105 }
104106 else throw(((((("difu= " + toString(difu)) + " / difs= ") + toString(difs)) + " / difw= ") + toString(difw)))
105107 else throw("Strict value is not equal to itself.")
106108 }
107109 else throw("Strict value is not equal to itself.")
108110 }
109111 else throw("Strict value is not equal to itself.")
110112 }
111113 else throw("Strict value is not equal to itself.")
112114 }
113115 else throw("Strict value is not equal to itself.")
114116 }
115117 else throw("Strict value is not equal to itself.")
116118 }
117119 else throw("Strict value is not equal to itself.")
118120 }
119121 else throw("Strict value is not equal to itself.")
120122 }
121123 else throw("Strict value is not equal to itself.")
122124 }
123125 else throw("Strict value is not equal to itself.")
124126 }
125127 else throw("Strict value is not equal to itself.")
126128 }
127129 else throw("Strict value is not equal to itself.")
128130 }
129131
130132
131133
132134 @Callable(i)
133135 func call2 (amnt,min) = if ((i.caller != admin))
134136 then throw("only admin")
135137 else {
136138 let bbu = assetBalance(this, U)
137139 let bbw = assetBalance(this, W)
138140 let bbs = assetBalance(this, S)
139141 if (if (if ((bbu == bbu))
140142 then (bbw == bbw)
141143 else false)
142144 then (bbs == bbs)
143145 else false)
144146 then {
145147 let swap1 = invoke(SW, "exchange", [1], [AttachedPayment(W, (amnt * scale8))])
146148 if ((swap1 == swap1))
147149 then {
148150 let diffs = (assetBalance(this, S) - bbs)
149151 if ((diffs == diffs))
150152 then {
151153 let swap2 = invoke(SU, "exchange", [1], [AttachedPayment(S, diffs)])
152154 if ((swap2 == swap2))
153155 then {
154156 let diffu = (assetBalance(this, U) - bbu)
155157 if ((diffu == diffu))
156158 then {
157159 let swap3 = invoke(WU, "exchange", [1], [AttachedPayment(U, diffu)])
158160 if ((swap3 == swap3))
159161 then {
160162 let diffw = (assetBalance(this, W) - bbw)
161163 if ((diffw == diffw))
162164 then if ((diffw > min))
163165 then {
164166 let ok = "ok"
165167 [IntegerEntry("debug", diffw)]
166168 }
167169 else throw(toString(diffw))
168170 else throw("strict")
169171 }
170172 else throw("strict")
171173 }
172174 else throw("strict")
173175 }
174176 else throw("strict")
175177 }
176178 else throw("strict")
177179 }
178180 else throw("strict")
179181 }
180182 else throw("Strict")
181183 }
182184
183185
184186 @Verifier(tx)
185187 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
186188

github/deemru/w8io/169f3d6 
46.49 ms