tx · 83rrYT3m2RtbbcvcoNRpRfxW23gZamgXrWz5iLxXbiNk 3Muw1aRbeKgLqAS264AakECyQAvDsnweHLu: -0.01700000 Waves 2022.06.09 11:43 [2088606] smart account 3Muw1aRbeKgLqAS264AakECyQAvDsnweHLu > SELF 0.00000000 Waves
{ "type": 13, "id": "83rrYT3m2RtbbcvcoNRpRfxW23gZamgXrWz5iLxXbiNk", "fee": 1700000, "feeAssetId": null, "timestamp": 1654764183672, "version": 1, "sender": "3Muw1aRbeKgLqAS264AakECyQAvDsnweHLu", "senderPublicKey": "668WwQVaWxezbvLEK3FccCSTbjst4zYAJDPrfLFRj9b9", "proofs": [ "QfXoijFSZNrF6f1HmroyftWcupTsPsG5eK288w6U1UCYcYixXLYikeMLUwb2ffQ8GUayLQsXtVLDkCEobeuLLed" ], "script": "base64:AAIFAAAAAAAAACwIAhIDCgEIEgASABIFCgMICAgSCQoHCAgICAEIARIAEgQKAggIEgMKAQgSAAAAABcAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAACGNvbnRyYWN0AgAAAA9scF9zdGFraW5nX3YyOiABAAAAE2tleU1hbmFnZXJQdWJsaWNLZXkAAAAACQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAQbWFuYWdlclB1YmxpY0tleQUAAAADbmlsBQAAAANTRVABAAAAGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAAAAAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAF3BlbmRpbmdNYW5hZ2VyUHVibGljS2V5BQAAAANuaWwFAAAAA1NFUAEAAAAGa2V5VFZMAAAAAQAAAAdhc3NldElkCQAEuQAAAAIJAARMAAAAAgIAAAAEJXMlcwkABEwAAAACAgAAAAN0dmwJAARMAAAAAgUAAAAHYXNzZXRJZAUAAAADbmlsBQAAAANTRVABAAAADWtleVRWTEhpc3RvcnkAAAACAAAAB2Fzc2V0SWQAAAAGaGVpZ2h0CQAEuQAAAAI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AAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXluEqvv", "chainId": 84, "height": 2088606, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3UKHsdkxXxJbHrvg2UYRqUCd8wu4443LsRP1Fh1mUDjK Next: Er2dBrBRRNEbQv8FtrU9wtyXaeZjJtnJKbeRcHXZRFpJ Diff:
Old | New | Differences | |
---|---|---|---|
187 | 187 | then true | |
188 | 188 | else A("no corresponding withdrawal request")] | |
189 | 189 | if ((M == M)) | |
190 | - | then { | |
191 | - | let T = valueOrElse(getInteger(k(g)), 0) | |
192 | - | [ScriptTransfer(addressFromStringValue(s), V, fromBase58String(g)), DeleteEntry(r(g, s, W)), IntegerEntry(k(g), (T - V))] | |
193 | - | } | |
190 | + | then [ScriptTransfer(addressFromStringValue(s), V, fromBase58String(g)), DeleteEntry(r(g, s, W))] | |
194 | 191 | else throw("Strict value is not equal to itself.") | |
195 | 192 | } | |
196 | 193 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "" | |
7 | 7 | ||
8 | 8 | let c = "lp_staking_v2: " | |
9 | 9 | ||
10 | 10 | func d () = makeString(["%s", "managerPublicKey"], a) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func e () = makeString(["%s", "pendingManagerPublicKey"], a) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func f (g) = makeString(["%s%s", "tvl", g], a) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func h (g,i) = makeString(["%s%s%d", "tvlHistory", g, toString(i)], a) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func j (g,i) = makeString(["%s%s%d", "topUpHistory", g, toString(i)], a) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func k (g) = makeString(["%s%s", "pendingWithdrawals", g], a) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func l (g) = makeString(["%s%s", "delayInBlocks", g], a) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func m (g) = makeString(["%s%s", "created", g], a) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func n (g) = makeString(["%s%s", "assetIdToLPId", g], a) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func o (p) = makeString(["%s%s", "lpIdToAssetId", p], a) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func q (g) = makeString(["%s%s", "proxyAddress", g], a) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func r (g,s,t) = makeString(["%s%s%s%s", "userWithdrawalAmount", g, s, t], a) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func u (g) = makeString(["%s%s", "otherChainAssetDecimals", g], a) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func v () = makeString(["%s", "assetsStoreContract"], a) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func w () = { | |
53 | 53 | let x = getString(d()) | |
54 | 54 | if ($isInstanceOf(x, "String")) | |
55 | 55 | then { | |
56 | 56 | let y = x | |
57 | 57 | fromBase58String(y) | |
58 | 58 | } | |
59 | 59 | else if ($isInstanceOf(x, "Unit")) | |
60 | 60 | then unit | |
61 | 61 | else throw("Match error") | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func z () = { | |
66 | 66 | let x = getString(e()) | |
67 | 67 | if ($isInstanceOf(x, "String")) | |
68 | 68 | then { | |
69 | 69 | let y = x | |
70 | 70 | fromBase58String(y) | |
71 | 71 | } | |
72 | 72 | else if ($isInstanceOf(x, "Unit")) | |
73 | 73 | then unit | |
74 | 74 | else throw("Match error") | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func A (B) = throw((c + B)) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func C (D) = { | |
82 | 82 | let E = A("permission denied") | |
83 | 83 | let x = w() | |
84 | 84 | if ($isInstanceOf(x, "ByteVector")) | |
85 | 85 | then { | |
86 | 86 | let F = x | |
87 | 87 | if ((D.callerPublicKey == F)) | |
88 | 88 | then true | |
89 | 89 | else E | |
90 | 90 | } | |
91 | 91 | else if ($isInstanceOf(x, "Unit")) | |
92 | 92 | then if ((D.caller == this)) | |
93 | 93 | then true | |
94 | 94 | else E | |
95 | 95 | else throw("Match error") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func G () = addressFromStringValue(value(getString(v()))) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func H (D,g) = { | |
103 | 103 | let I = (toString(D.caller) == valueOrElse(getString(q(g)), b)) | |
104 | 104 | if (I) | |
105 | 105 | then true | |
106 | 106 | else { | |
107 | 107 | let J = C(D) | |
108 | 108 | if ((J == J)) | |
109 | 109 | then true | |
110 | 110 | else throw("Strict value is not equal to itself.") | |
111 | 111 | } | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | @Callable(D) | |
116 | 116 | func constructor (G) = { | |
117 | 117 | let J = C(D) | |
118 | 118 | if ((J == J)) | |
119 | 119 | then [StringEntry(v(), G)] | |
120 | 120 | else throw("Strict value is not equal to itself.") | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | ||
125 | 125 | @Callable(D) | |
126 | 126 | func put () = { | |
127 | 127 | let K = value(D.payments[0]) | |
128 | 128 | let L = value(K.assetId) | |
129 | 129 | let g = toBase58String(L) | |
130 | 130 | let M = [if ((size(D.payments) == 1)) | |
131 | 131 | then true | |
132 | 132 | else A("only one payment must be attached"), if (valueOrElse(getBoolean(m(g)), false)) | |
133 | 133 | then true | |
134 | 134 | else A("attached payment asset must be registered in the contract"), if ((K.amount > 0)) | |
135 | 135 | then true | |
136 | 136 | else A("positive amount required")] | |
137 | 137 | if ((M == M)) | |
138 | 138 | then { | |
139 | 139 | let N = valueOrElse(getInteger(f(g)), 0) | |
140 | 140 | let p = value(getString(n(g))) | |
141 | 141 | let O = value(assetInfo(fromBase58String(g))) | |
142 | 142 | let P = if ((N > 0)) | |
143 | 143 | then ((K.amount * O.quantity) / N) | |
144 | 144 | else K.amount | |
145 | 145 | [Reissue(O.id, P, true), ScriptTransfer(D.caller, P, O.id)] | |
146 | 146 | } | |
147 | 147 | else throw("Strict value is not equal to itself.") | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | ||
152 | 152 | @Callable(D) | |
153 | 153 | func submitGetRequest () = { | |
154 | 154 | let K = value(D.payments[0]) | |
155 | 155 | let Q = value(K.assetId) | |
156 | 156 | let p = toBase58String(Q) | |
157 | 157 | let s = toString(D.caller) | |
158 | 158 | let R = value(getString(o(p))) | |
159 | 159 | let S = K.amount | |
160 | 160 | let M = [if ((size(D.payments) == 1)) | |
161 | 161 | then true | |
162 | 162 | else A("only one payment must be attached"), if (valueOrElse(getBoolean(m(R)), false)) | |
163 | 163 | then true | |
164 | 164 | else A("attached payment asset must be registered in the contract"), if ((S > 0)) | |
165 | 165 | then true | |
166 | 166 | else A("positive amount to withdrawal required")] | |
167 | 167 | if ((M == M)) | |
168 | 168 | then { | |
169 | 169 | let T = valueOrElse(getInteger(k(R)), 0) | |
170 | 170 | let N = valueOrElse(getInteger(f(R)), 0) | |
171 | 171 | let O = value(assetInfo(Q)) | |
172 | 172 | let U = O.decimals | |
173 | 173 | let V = ((S * N) / O.quantity) | |
174 | 174 | [Burn(Q, S), IntegerEntry(k(R), (T + V)), IntegerEntry(r(R, s, toBase58String(D.transactionId)), V)] | |
175 | 175 | } | |
176 | 176 | else throw("Strict value is not equal to itself.") | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | ||
181 | 181 | @Callable(D) | |
182 | 182 | func executeGetRequest (g,s,W) = { | |
183 | 183 | let V = valueOrElse(getInteger(r(g, s, W)), 0) | |
184 | 184 | let M = [if (valueOrElse(getBoolean(m(g)), false)) | |
185 | 185 | then true | |
186 | 186 | else A("asset must be registered in the contract"), if ((V > 0)) | |
187 | 187 | then true | |
188 | 188 | else A("no corresponding withdrawal request")] | |
189 | 189 | if ((M == M)) | |
190 | - | then { | |
191 | - | let T = valueOrElse(getInteger(k(g)), 0) | |
192 | - | [ScriptTransfer(addressFromStringValue(s), V, fromBase58String(g)), DeleteEntry(r(g, s, W)), IntegerEntry(k(g), (T - V))] | |
193 | - | } | |
190 | + | then [ScriptTransfer(addressFromStringValue(s), V, fromBase58String(g)), DeleteEntry(r(g, s, W))] | |
194 | 191 | else throw("Strict value is not equal to itself.") | |
195 | 192 | } | |
196 | 193 | ||
197 | 194 | ||
198 | 195 | ||
199 | 196 | @Callable(D) | |
200 | 197 | func registerAsset (g,X,Y,Z,aa,ab,ac) = { | |
201 | 198 | let M = [C(D), if ((aa >= 0)) | |
202 | 199 | then true | |
203 | 200 | else A("invalid delayInBlocks"), if ((addressFromString(ab) != unit)) | |
204 | 201 | then true | |
205 | 202 | else A("invalid proxyAddress"), if ((valueOrElse(getBoolean(m(g)), false) == false)) | |
206 | 203 | then true | |
207 | 204 | else A("asset already registered")] | |
208 | 205 | if ((M == M)) | |
209 | 206 | then { | |
210 | 207 | let U = value(assetInfo(fromBase58String(g))).decimals | |
211 | 208 | let ad = Issue(X, Y, 1, U, true) | |
212 | 209 | let Q = calculateAssetId(ad) | |
213 | 210 | let p = toBase58String(Q) | |
214 | 211 | let ae = invoke(G(), "createOrUpdate", [p, Z, false], nil) | |
215 | 212 | if ((ae == ae)) | |
216 | 213 | then { | |
217 | 214 | let af = invoke(G(), "addLabel", [p, "DEFI"], nil) | |
218 | 215 | if ((af == af)) | |
219 | 216 | then [BooleanEntry(m(g), true), IntegerEntry(f(g), 0), IntegerEntry(h(g, height), 0), IntegerEntry(l(g), aa), StringEntry(o(p), g), StringEntry(n(g), p), StringEntry(q(g), ab), IntegerEntry(u(g), ac), ad, Burn(Q, 1)] | |
220 | 217 | else throw("Strict value is not equal to itself.") | |
221 | 218 | } | |
222 | 219 | else throw("Strict value is not equal to itself.") | |
223 | 220 | } | |
224 | 221 | else throw("Strict value is not equal to itself.") | |
225 | 222 | } | |
226 | 223 | ||
227 | 224 | ||
228 | 225 | ||
229 | 226 | @Callable(D) | |
230 | 227 | func topUpBalance () = { | |
231 | 228 | let K = valueOrErrorMessage(D.payments[0], (c + "payment must be attached")) | |
232 | 229 | let g = toBase58String(value(K.assetId)) | |
233 | 230 | let ag = K.amount | |
234 | 231 | let T = valueOrElse(getInteger(k(g)), 0) | |
235 | 232 | let M = [H(D, g), if ((size(D.payments) == 1)) | |
236 | 233 | then true | |
237 | 234 | else A("only one payment must be attached"), if (valueOrElse(getBoolean(m(g)), false)) | |
238 | 235 | then true | |
239 | 236 | else A("attached payment asset must be registered in the contract"), if ((T != 0)) | |
240 | 237 | then true | |
241 | 238 | else A("zero pendingWithdrawals, nothing to top up"), if ((T >= ag)) | |
242 | 239 | then true | |
243 | 240 | else A("amount to top up must be less or equal than pendingWithdrawals"), if ((getInteger(j(g, height)) == unit)) | |
244 | 241 | then true | |
245 | 242 | else A("already have topUp in current block, wait for next block")] | |
246 | 243 | if ((M == M)) | |
247 | 244 | then [IntegerEntry(k(g), (T - ag)), IntegerEntry(j(g, height), ag)] | |
248 | 245 | else throw("Strict value is not equal to itself.") | |
249 | 246 | } | |
250 | 247 | ||
251 | 248 | ||
252 | 249 | ||
253 | 250 | @Callable(D) | |
254 | 251 | func setTVL (g,ah) = { | |
255 | 252 | let M = [H(D, g), if (valueOrElse(getBoolean(m(g)), false)) | |
256 | 253 | then true | |
257 | 254 | else A("asset must be registered in the contract"), if ((getInteger(h(g, height)) == unit)) | |
258 | 255 | then true | |
259 | 256 | else A("already have setTVL in current block, wait for next block")] | |
260 | 257 | if ((M == M)) | |
261 | 258 | then { | |
262 | 259 | let ai = parseBigIntValue(ah) | |
263 | 260 | let aj = parseBigIntValue("10") | |
264 | 261 | let ak = value(assetInfo(fromBase58String(g))).decimals | |
265 | 262 | let ac = value(getInteger(u(g))) | |
266 | 263 | let al = if ((ac > ak)) | |
267 | 264 | then { | |
268 | 265 | let am = parseBigIntValue(toString((ac - ak))) | |
269 | 266 | (ai / pow(aj, 0, am, 0, 0, DOWN)) | |
270 | 267 | } | |
271 | 268 | else if ((ak > ac)) | |
272 | 269 | then { | |
273 | 270 | let am = parseBigIntValue(toString((ak - ac))) | |
274 | 271 | (ai * pow(aj, 0, am, 0, 0, DOWN)) | |
275 | 272 | } | |
276 | 273 | else ai | |
277 | 274 | let an = toInt(al) | |
278 | 275 | [IntegerEntry(f(g), an), IntegerEntry(h(g, height), an)] | |
279 | 276 | } | |
280 | 277 | else throw("Strict value is not equal to itself.") | |
281 | 278 | } | |
282 | 279 | ||
283 | 280 | ||
284 | 281 | ||
285 | 282 | @Callable(D) | |
286 | 283 | func setManager (ao) = { | |
287 | 284 | let J = C(D) | |
288 | 285 | if ((J == J)) | |
289 | 286 | then { | |
290 | 287 | let ap = fromBase58String(ao) | |
291 | 288 | if ((ap == ap)) | |
292 | 289 | then [StringEntry(e(), ao)] | |
293 | 290 | else throw("Strict value is not equal to itself.") | |
294 | 291 | } | |
295 | 292 | else throw("Strict value is not equal to itself.") | |
296 | 293 | } | |
297 | 294 | ||
298 | 295 | ||
299 | 296 | ||
300 | 297 | @Callable(D) | |
301 | 298 | func confirmManager () = { | |
302 | 299 | let aq = z() | |
303 | 300 | let ar = if (isDefined(aq)) | |
304 | 301 | then true | |
305 | 302 | else A("no pending manager") | |
306 | 303 | if ((ar == ar)) | |
307 | 304 | then { | |
308 | 305 | let as = if ((D.callerPublicKey == value(aq))) | |
309 | 306 | then true | |
310 | 307 | else A("you are not pending manager") | |
311 | 308 | if ((as == as)) | |
312 | 309 | then [StringEntry(d(), toBase58String(value(aq))), DeleteEntry(e())] | |
313 | 310 | else throw("Strict value is not equal to itself.") | |
314 | 311 | } | |
315 | 312 | else throw("Strict value is not equal to itself.") | |
316 | 313 | } | |
317 | 314 | ||
318 | 315 | ||
319 | 316 | @Verifier(at) | |
320 | 317 | func au () = { | |
321 | 318 | let av = { | |
322 | 319 | let x = w() | |
323 | 320 | if ($isInstanceOf(x, "ByteVector")) | |
324 | 321 | then { | |
325 | 322 | let F = x | |
326 | 323 | F | |
327 | 324 | } | |
328 | 325 | else if ($isInstanceOf(x, "Unit")) | |
329 | 326 | then at.senderPublicKey | |
330 | 327 | else throw("Match error") | |
331 | 328 | } | |
332 | 329 | sigVerify(at.bodyBytes, at.proofs[0], av) | |
333 | 330 | } | |
334 | 331 |
github/deemru/w8io/026f985 38.14 ms ◑