tx · 8mWJMViQUYAhjFJFcDFGbkPyBd1vRtLJcdu6zJtSW7qK 3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP: -0.05000000 Waves 2021.08.23 19:07 [1671189] smart account 3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP > SELF 0.00000000 Waves
{ "type": 13, "id": "8mWJMViQUYAhjFJFcDFGbkPyBd1vRtLJcdu6zJtSW7qK", "fee": 5000000, "feeAssetId": null, "timestamp": 1629734813790, "version": 2, "chainId": 84, "sender": "3N7AyMYR2ovan7TNvPE9jMRTejZyXPcV9NP", "senderPublicKey": "Go3xxijfukFnawU9Jyy1yX4dSyxKT9SYT6Tp3g6iTAjt", "proofs": [ "2uP1BGFWQTtokPyX8CbkxfnFGByAZs9h89j7Gv6Vm5sppNjdM5bvdh4SA5jaNPs5kpJKLno3hQRXawsB25Grzjpb" ], "script": "base64:AAIFAAAAAAAAAfoIAhIECgIBARIECgIBARoICgJhMRICV1UaCAoCYTISAlNXGggKAmEzEgJTVRoHCgJhNBIBVxoHCgJhNRIBVRoHCgJhNhIBUxoLCgJhNxIFYWRtaW4aDAoCYTgSBnNjYWxlOBoeCgJhORIYY29tbWlzc2lvblNjYWxlRGVsaW1pdGVyGhAKAmIxEgpjb21taXNzaW9uGgoKAmIyEgRmZWVzGgoKAmIzEgRmcm9tGggKAmI0EgJ0bxoKCgJiNRIEYW1udBoWCgJiNhIQYW1vdW50V2l0aG91dEZlZRoTCgJiNxINYW1vdW50V2l0aEZlZRoHCgJiOBIBaRoJCgJiORIDbWluGgkKAmMxEgNlMWEaCQoCYzISA2UxYhoJCgJjMxIDZTJhGgkKAmM0EgNlMmIaCQoCYzUSA2UzYRoJCgJjNhIDZTNiGgkKAmM3EgNiYnUaCQoCYzgSA2JidxoJCgJjORIDYmJzGgoKAmQxEgRkaWZ1GgoKAmQyEgRkaWZzGgoKAmQzEgRkaWZ3GgsKAmQ0EgVzd2FwMRoLCgJkNRIFZGlmZnUaCwoCZDYSBXN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1lbnQAAAACBQAAAAJhNgUAAAACZDcFAAAAA25pbAMJAAAAAAAAAgUAAAACZDYFAAAAAmQ2BAAAAAJkNQkAAGUAAAACCQAD8AAAAAIFAAAABHRoaXMFAAAAAmE1BQAAAAJjNwMJAAAAAAAAAgUAAAACZDUFAAAAAmQ1BAAAAAJkOAkAA/wAAAAEBQAAAAJhMQIAAAAIZXhjaGFuZ2UJAARMAAAAAgAAAAAAAAAAAQUAAAADbmlsCQAETAAAAAIJAQAAAA9BdHRhY2hlZFBheW1lbnQAAAACBQAAAAJhNQUAAAACZDUFAAAAA25pbAMJAAAAAAAAAgUAAAACZDgFAAAAAmQ4BAAAAAJkOQkAAGUAAAACCQAD8AAAAAIFAAAABHRoaXMFAAAAAmE0BQAAAAJjOAMJAAAAAAAAAgUAAAACZDkFAAAAAmQ5AwkAAGYAAAACBQAAAAJkOQUAAAACYjkEAAAAAmUxAgAAAAJvawkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAFZGVidWcFAAAAAmQ5BQAAAANuaWwJAAACAAAAAQkAAaQAAAABBQAAAAJkOQkAAAIAAAABAgAAAAZzdHJpY3QJAAACAAAAAQIAAAAGc3RyaWN0CQAAAgAAAAECAAAABnN0cmljdAkAAAIAAAABAgAAAAZzdHJpY3QJAAACAAAAAQIAAAAGc3RyaWN0CQAAAgAAAAECAAAABnN0cmljdAkAAAIAAAABAgAAAAZTdHJpY3QAAAABAAAAAmUyAQAAAAJlMwAAAAAJAAH0AAAAAwgFAAAAAmUyAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACZTIAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACZTIAAAAPc2VuZGVyUHVibGljS2V53IXHIQ==", "height": 1671189, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: hEWtLEXeQjKyAjVE6wo4MHYo9zmzmRXYDkiVkyHSVyG Next: DnBq9Q8gpE7Ume3vPDXSU3WHAhhJUrXF3DL7EHLusSY5 Diff:
Old | New | Differences | |
---|---|---|---|
38 | 38 | let e1b = getIntegerValue(WU, "B_asset_balance") | |
39 | 39 | if ((e1b == e1b)) | |
40 | 40 | then { | |
41 | - | let e2a = getIntegerValue( | |
41 | + | let e2a = getIntegerValue(SU, "A_asset_balance") | |
42 | 42 | if ((e2a == e2a)) | |
43 | 43 | then { | |
44 | - | let e2b = getIntegerValue( | |
44 | + | let e2b = getIntegerValue(SU, "B_asset_balance") | |
45 | 45 | if ((e2b == e2b)) | |
46 | 46 | then { | |
47 | - | let e3a = getIntegerValue( | |
47 | + | let e3a = getIntegerValue(SW, "A_asset_balance") | |
48 | 48 | if ((e3a == e3a)) | |
49 | 49 | then { | |
50 | - | let e3b = getIntegerValue( | |
50 | + | let e3b = getIntegerValue(SW, "B_asset_balance") | |
51 | 51 | if ((e3b == e3b)) | |
52 | 52 | then { | |
53 | 53 | let bbu = assetBalance(this, U) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let WU = addressFromStringValue(value("3NDD3ifAC17cLzxuYqsgXDRY9DTQ5BqmvwL")) | |
5 | 5 | ||
6 | 6 | let SW = addressFromStringValue(value("3NAzES7pSjfoHsKNumP5HRtSt3qadbqnHip")) | |
7 | 7 | ||
8 | 8 | let SU = addressFromStringValue(value("3MrBtdped4oUFs1BvLNu53Dm1AMGiTHkT9B")) | |
9 | 9 | ||
10 | 10 | let W = base58'3Tg4GRpKeek5wWAQRJKH1ucjMuKNom3f2h67WNNu6xVS' | |
11 | 11 | ||
12 | 12 | let U = base58'gAAmMoquySsX6q5EmzciFfB8RecAhZR9W1HKNntNekL' | |
13 | 13 | ||
14 | 14 | let S = base58'89G3XEYzMSztS6RPN5h2da7j43r4zgKufReZWn1MqX7g' | |
15 | 15 | ||
16 | 16 | let admin = addressFromStringValue("3N97G98bPF5ghnZ1iMmQ7tMH6MBsNZnS272") | |
17 | 17 | ||
18 | 18 | let scale8 = 100000000 | |
19 | 19 | ||
20 | 20 | let commissionScaleDelimiter = 1000000 | |
21 | 21 | ||
22 | 22 | let commission = 3000 | |
23 | 23 | ||
24 | 24 | func fees (from,to,amnt) = { | |
25 | 25 | let amountWithoutFee = fraction(to, amnt, (amnt + from)) | |
26 | 26 | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
27 | 27 | amountWithFee | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(i) | |
32 | 32 | func call1 (amnt,min) = if ((i.caller != admin)) | |
33 | 33 | then throw("only admin") | |
34 | 34 | else { | |
35 | 35 | let e1a = getIntegerValue(WU, "A_asset_balance") | |
36 | 36 | if ((e1a == e1a)) | |
37 | 37 | then { | |
38 | 38 | let e1b = getIntegerValue(WU, "B_asset_balance") | |
39 | 39 | if ((e1b == e1b)) | |
40 | 40 | then { | |
41 | - | let e2a = getIntegerValue( | |
41 | + | let e2a = getIntegerValue(SU, "A_asset_balance") | |
42 | 42 | if ((e2a == e2a)) | |
43 | 43 | then { | |
44 | - | let e2b = getIntegerValue( | |
44 | + | let e2b = getIntegerValue(SU, "B_asset_balance") | |
45 | 45 | if ((e2b == e2b)) | |
46 | 46 | then { | |
47 | - | let e3a = getIntegerValue( | |
47 | + | let e3a = getIntegerValue(SW, "A_asset_balance") | |
48 | 48 | if ((e3a == e3a)) | |
49 | 49 | then { | |
50 | - | let e3b = getIntegerValue( | |
50 | + | let e3b = getIntegerValue(SW, "B_asset_balance") | |
51 | 51 | if ((e3b == e3b)) | |
52 | 52 | then { | |
53 | 53 | let bbu = assetBalance(this, U) | |
54 | 54 | if ((bbu == bbu)) | |
55 | 55 | then { | |
56 | 56 | let bbw = assetBalance(this, W) | |
57 | 57 | if ((bbw == bbw)) | |
58 | 58 | then { | |
59 | 59 | let bbs = assetBalance(this, S) | |
60 | 60 | if ((bbs == bbs)) | |
61 | 61 | then { | |
62 | 62 | let difu = fees(e1a, e1b, (amnt * scale8)) | |
63 | 63 | if ((difu == difu)) | |
64 | 64 | then { | |
65 | 65 | let difs = fees(e2a, e2b, difu) | |
66 | 66 | if ((difs == difs)) | |
67 | 67 | then { | |
68 | 68 | let difw = fees(e3a, e3b, difs) | |
69 | 69 | if ((difw == difw)) | |
70 | 70 | then if ((difw > ((amnt * scale8) + min))) | |
71 | 71 | then { | |
72 | 72 | let swap1 = invoke(WU, "exchange", [1], [AttachedPayment(W, (amnt * scale8))]) | |
73 | 73 | if ((swap1 == swap1)) | |
74 | 74 | then { | |
75 | 75 | let diffu = (assetBalance(this, U) - bbu) | |
76 | 76 | if ((diffu == diffu)) | |
77 | 77 | then { | |
78 | 78 | let swap2 = invoke(SU, "exchange", [1], [AttachedPayment(U, diffu)]) | |
79 | 79 | if ((swap2 == swap2)) | |
80 | 80 | then { | |
81 | 81 | let diffs = (assetBalance(this, S) - bbs) | |
82 | 82 | if ((diffs == diffs)) | |
83 | 83 | then { | |
84 | 84 | let swap3 = invoke(SW, "exchange", [1], [AttachedPayment(S, diffs)]) | |
85 | 85 | if ((swap3 == swap3)) | |
86 | 86 | then { | |
87 | 87 | let diffw = (assetBalance(this, W) - bbw) | |
88 | 88 | if ((diffw == diffw)) | |
89 | 89 | then if ((diffw > min)) | |
90 | 90 | then [IntegerEntry("debug", diffw)] | |
91 | 91 | else throw(("diffw" + toString(diffw))) | |
92 | 92 | else throw("Strict value is not equal to itself.") | |
93 | 93 | } | |
94 | 94 | else throw("Strict value is not equal to itself.") | |
95 | 95 | } | |
96 | 96 | else throw("Strict value is not equal to itself.") | |
97 | 97 | } | |
98 | 98 | else throw("Strict value is not equal to itself.") | |
99 | 99 | } | |
100 | 100 | else throw("Strict value is not equal to itself.") | |
101 | 101 | } | |
102 | 102 | else throw("Strict value is not equal to itself.") | |
103 | 103 | } | |
104 | 104 | else throw(("difw" + toString(difw))) | |
105 | 105 | else throw("Strict value is not equal to itself.") | |
106 | 106 | } | |
107 | 107 | else throw("Strict value is not equal to itself.") | |
108 | 108 | } | |
109 | 109 | else throw("Strict value is not equal to itself.") | |
110 | 110 | } | |
111 | 111 | else throw("Strict value is not equal to itself.") | |
112 | 112 | } | |
113 | 113 | else throw("Strict value is not equal to itself.") | |
114 | 114 | } | |
115 | 115 | else throw("Strict value is not equal to itself.") | |
116 | 116 | } | |
117 | 117 | else throw("Strict value is not equal to itself.") | |
118 | 118 | } | |
119 | 119 | else throw("Strict value is not equal to itself.") | |
120 | 120 | } | |
121 | 121 | else throw("Strict value is not equal to itself.") | |
122 | 122 | } | |
123 | 123 | else throw("Strict value is not equal to itself.") | |
124 | 124 | } | |
125 | 125 | else throw("Strict value is not equal to itself.") | |
126 | 126 | } | |
127 | 127 | else throw("Strict value is not equal to itself.") | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
132 | 132 | @Callable(i) | |
133 | 133 | func call2 (amnt,min) = if ((i.caller != admin)) | |
134 | 134 | then throw("only admin") | |
135 | 135 | else { | |
136 | 136 | let bbu = assetBalance(this, U) | |
137 | 137 | let bbw = assetBalance(this, W) | |
138 | 138 | let bbs = assetBalance(this, S) | |
139 | 139 | if (if (if ((bbu == bbu)) | |
140 | 140 | then (bbw == bbw) | |
141 | 141 | else false) | |
142 | 142 | then (bbs == bbs) | |
143 | 143 | else false) | |
144 | 144 | then { | |
145 | 145 | let swap1 = invoke(SW, "exchange", [1], [AttachedPayment(W, (amnt * scale8))]) | |
146 | 146 | if ((swap1 == swap1)) | |
147 | 147 | then { | |
148 | 148 | let diffs = (assetBalance(this, S) - bbs) | |
149 | 149 | if ((diffs == diffs)) | |
150 | 150 | then { | |
151 | 151 | let swap2 = invoke(SU, "exchange", [1], [AttachedPayment(S, diffs)]) | |
152 | 152 | if ((swap2 == swap2)) | |
153 | 153 | then { | |
154 | 154 | let diffu = (assetBalance(this, U) - bbu) | |
155 | 155 | if ((diffu == diffu)) | |
156 | 156 | then { | |
157 | 157 | let swap3 = invoke(WU, "exchange", [1], [AttachedPayment(U, diffu)]) | |
158 | 158 | if ((swap3 == swap3)) | |
159 | 159 | then { | |
160 | 160 | let diffw = (assetBalance(this, W) - bbw) | |
161 | 161 | if ((diffw == diffw)) | |
162 | 162 | then if ((diffw > min)) | |
163 | 163 | then { | |
164 | 164 | let ok = "ok" | |
165 | 165 | [IntegerEntry("debug", diffw)] | |
166 | 166 | } | |
167 | 167 | else throw(toString(diffw)) | |
168 | 168 | else throw("strict") | |
169 | 169 | } | |
170 | 170 | else throw("strict") | |
171 | 171 | } | |
172 | 172 | else throw("strict") | |
173 | 173 | } | |
174 | 174 | else throw("strict") | |
175 | 175 | } | |
176 | 176 | else throw("strict") | |
177 | 177 | } | |
178 | 178 | else throw("strict") | |
179 | 179 | } | |
180 | 180 | else throw("Strict") | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | @Verifier(tx) | |
185 | 185 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
186 | 186 |
github/deemru/w8io/169f3d6 43.68 ms ◑