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