tx · GyQbsZns2enetpwMm2hFFis4e5RvJCA4hsi3jZK66yEo 3MxUSyFKcKESBg3Nf4Gwj1Qn15Jr9NTJE1a: -0.01000000 Waves 2022.08.30 17:45 [2207328] smart account 3MxUSyFKcKESBg3Nf4Gwj1Qn15Jr9NTJE1a > SELF 0.00000000 Waves
{ "type": 13, "id": "GyQbsZns2enetpwMm2hFFis4e5RvJCA4hsi3jZK66yEo", "fee": 1000000, "feeAssetId": null, "timestamp": 1661870744990, "version": 1, "sender": "3MxUSyFKcKESBg3Nf4Gwj1Qn15Jr9NTJE1a", "senderPublicKey": "Gz38AcUCTd55TqzHQABThf42Sb9M2s8VmPT4u68hNZhA", "proofs": [ "2HQ46TgzeGFWKrByF91QXg5W1AiKq6bGUCj1Y6sNvd2paaAJZ5CzVApQ8vVK2KQuvDdzCyLF4meTqGw4s14zM1zF" ], "script": "base64:AAIFAAAAAAAABHQIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCCIDU0VQIgVFTVBUWSIOaWR4UG9vbEFkZHJlc3MiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiD2lkeEZhY3RTdGFrQ250ciIFZGVsYXkiC2tleUZhY3RDbnRyIhNrZXlNYW5hZ2VyUHVibGljS2V5IhprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleSILa2V5UG9vbEFkZHIiC2tleUFtdEFzc2V0Ig1rZXlQcmljZUFzc2V0Ig9rZXlBZG1pblB1YktleXMiBmtleUFtcCINa2V5QW1wSGlzdG9yeSIGaGVpZ2h0IhFsYXN0R2V0T25lVGtuQ2FsbCIGY2FsbGVyIhFsYXN0UHV0T25lVGtuQ2FsbCIQa2V5RmFjdG9yeUNvbmZpZyINa2V5UG9vbENvbmZpZyIGaUFtdEFzIgVpUHJBcyIfa2V5TWFwcGluZ3NCYXNlQXNzZXQyaW50ZXJuYWxJZCIFYkFTdHIiIWtleUFsbG93ZWRMcFN0YWJsZ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JvZHlCeXRlcwkAAZEAAAACCAUAAAACYUUAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJhR1sqjaU=", "chainId": 84, "height": 2207328, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: HunpXmYK7Ngp942toRxD5kX4Qm9P1U4Gz93Qo52s1DDm Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let SEP = "__" | |
5 | + | ||
6 | + | let EMPTY = "" | |
7 | + | ||
8 | + | let idxPoolAddress = 1 | |
9 | + | ||
10 | + | let idxLPAsId = 3 | |
11 | + | ||
12 | + | let idxAmAsId = 4 | |
13 | + | ||
14 | + | let idxPrAsId = 5 | |
15 | + | ||
16 | + | let idxFactStakCntr = 1 | |
17 | + | ||
18 | + | let delay = "%s__delay" | |
19 | + | ||
20 | + | func keyFactCntr () = "%s__factoryContract" | |
21 | + | ||
22 | + | ||
23 | + | func keyManagerPublicKey () = "%s__managerPublicKey" | |
24 | + | ||
25 | + | ||
26 | + | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
27 | + | ||
28 | + | ||
29 | + | func keyPoolAddr () = "%s__poolAddress" | |
30 | + | ||
31 | + | ||
32 | + | func keyAmtAsset () = "%s__amountAsset" | |
33 | + | ||
34 | + | ||
35 | + | func keyPriceAsset () = "%s__priceAsset" | |
36 | + | ||
37 | + | ||
38 | + | func keyAdminPubKeys () = "%s__adminPubKeys" | |
39 | + | ||
40 | + | ||
41 | + | func keyAmp () = "%s__amp" | |
42 | + | ||
43 | + | ||
44 | + | func keyAmpHistory (height) = ("%s%d__amp__" + toString(height)) | |
45 | + | ||
46 | + | ||
47 | + | func lastGetOneTknCall (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP) | |
48 | + | ||
49 | + | ||
50 | + | func lastPutOneTknCall (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP) | |
51 | + | ||
52 | + | ||
53 | + | func keyFactoryConfig () = "%s__factoryConfig" | |
54 | + | ||
55 | + | ||
56 | + | func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config") | |
57 | + | ||
58 | + | ||
59 | + | func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr) | |
60 | + | ||
61 | + | ||
62 | + | func keyAllowedLpStableAddonScriptHash () = "%s__allowedLpStableAddonScriptHash" | |
63 | + | ||
64 | + | ||
65 | + | func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
66 | + | ||
67 | + | ||
68 | + | func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
69 | + | ||
70 | + | ||
71 | + | let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr())) | |
72 | + | ||
73 | + | let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr())) | |
74 | + | ||
75 | + | func getPoolConfig () = { | |
76 | + | let amtAs = getStringOrFail(poolContract, keyAmtAsset()) | |
77 | + | let priceAs = getStringOrFail(poolContract, keyPriceAsset()) | |
78 | + | let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs)) | |
79 | + | let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs)) | |
80 | + | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP) | |
81 | + | } | |
82 | + | ||
83 | + | ||
84 | + | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
85 | + | ||
86 | + | ||
87 | + | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
88 | + | case s: String => | |
89 | + | fromBase58String(s) | |
90 | + | case _: Unit => | |
91 | + | unit | |
92 | + | case _ => | |
93 | + | throw("Match error") | |
94 | + | } | |
95 | + | ||
96 | + | ||
97 | + | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
98 | + | case s: String => | |
99 | + | fromBase58String(s) | |
100 | + | case _: Unit => | |
101 | + | unit | |
102 | + | case _ => | |
103 | + | throw("Match error") | |
104 | + | } | |
105 | + | ||
106 | + | ||
107 | + | func mustManager (i) = { | |
108 | + | let pd = throw("Permission denied") | |
109 | + | match managerPublicKeyOrUnit() { | |
110 | + | case pk: ByteVector => | |
111 | + | if ((i.callerPublicKey == pk)) | |
112 | + | then true | |
113 | + | else pd | |
114 | + | case _: Unit => | |
115 | + | if ((i.caller == this)) | |
116 | + | then true | |
117 | + | else pd | |
118 | + | case _ => | |
119 | + | throw("Match error") | |
120 | + | } | |
121 | + | } | |
122 | + | ||
123 | + | ||
124 | + | func getAdmins () = match getString(keyAdminPubKeys()) { | |
125 | + | case s: String => | |
126 | + | if ((size(s) == 0)) | |
127 | + | then nil | |
128 | + | else split(s, SEP) | |
129 | + | case _ => | |
130 | + | nil | |
131 | + | } | |
132 | + | ||
133 | + | ||
134 | + | func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey))) | |
135 | + | then true | |
136 | + | else mustManager(i) | |
137 | + | ||
138 | + | ||
139 | + | func mustPool (i) = if ((i.caller == poolContract)) | |
140 | + | then true | |
141 | + | else throw("caller must be the pool") | |
142 | + | ||
143 | + | ||
144 | + | @Callable(i) | |
145 | + | func constructor (poolAddress) = { | |
146 | + | let checkCaller = mustManager(i) | |
147 | + | if ((checkCaller == checkCaller)) | |
148 | + | then [StringEntry(keyPoolAddr(), poolAddress)] | |
149 | + | else throw("Strict value is not equal to itself.") | |
150 | + | } | |
151 | + | ||
152 | + | ||
153 | + | ||
154 | + | @Callable(i) | |
155 | + | func setManager (pendingManagerPublicKey) = { | |
156 | + | let checkCaller = mustManager(i) | |
157 | + | if ((checkCaller == checkCaller)) | |
158 | + | then { | |
159 | + | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
160 | + | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
161 | + | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
162 | + | else throw("Strict value is not equal to itself.") | |
163 | + | } | |
164 | + | else throw("Strict value is not equal to itself.") | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | @Callable(i) | |
170 | + | func confirmManager () = { | |
171 | + | let pm = pendingManagerPublicKeyOrUnit() | |
172 | + | let hasPM = if (isDefined(pm)) | |
173 | + | then true | |
174 | + | else throw("No pending manager") | |
175 | + | if ((hasPM == hasPM)) | |
176 | + | then { | |
177 | + | let checkPM = if ((i.callerPublicKey == value(pm))) | |
178 | + | then true | |
179 | + | else throw("You are not pending manager") | |
180 | + | if ((checkPM == checkPM)) | |
181 | + | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
182 | + | else throw("Strict value is not equal to itself.") | |
183 | + | } | |
184 | + | else throw("Strict value is not equal to itself.") | |
185 | + | } | |
186 | + | ||
187 | + | ||
188 | + | ||
189 | + | @Callable(i) | |
190 | + | func setAdmins (adminPubKeys) = { | |
191 | + | let checkCaller = mustManager(i) | |
192 | + | if ((checkCaller == checkCaller)) | |
193 | + | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
194 | + | else throw("Strict value is not equal to itself.") | |
195 | + | } | |
196 | + | ||
197 | + | ||
198 | + | ||
199 | + | @Callable(i) | |
200 | + | func unstakeAndGetOneTkn (amount,exchResult,notUsed,outAmount,outAssetId,slippage) = { | |
201 | + | let checkPayments = if ((size(i.payments) != 0)) | |
202 | + | then throw("No pmnts expd") | |
203 | + | else true | |
204 | + | if ((checkPayments == checkPayments)) | |
205 | + | then { | |
206 | + | let cfg = getPoolConfig() | |
207 | + | let factoryCfg = getFactoryConfig() | |
208 | + | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
209 | + | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
210 | + | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil) | |
211 | + | if ((unstakeInv == unstakeInv)) | |
212 | + | then { | |
213 | + | let getOneTkn = reentrantInvoke(poolContract, "getOneTkn", [exchResult, notUsed, outAmount, outAssetId, slippage], [AttachedPayment(lpAssetId, amount)]) | |
214 | + | if ((getOneTkn == getOneTkn)) | |
215 | + | then nil | |
216 | + | else throw("Strict value is not equal to itself.") | |
217 | + | } | |
218 | + | else throw("Strict value is not equal to itself.") | |
219 | + | } | |
220 | + | else throw("Strict value is not equal to itself.") | |
221 | + | } | |
222 | + | ||
223 | + | ||
224 | + | ||
225 | + | @Callable(i) | |
226 | + | func setAmp (amp) = { | |
227 | + | let checkCaller = mustAdmin(i) | |
228 | + | if ((checkCaller == checkCaller)) | |
229 | + | then { | |
230 | + | let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil) | |
231 | + | let res2 = invoke(poolContract, "setS", [keyAmpHistory(r), amp], nil) | |
232 | + | $Tuple2(nil, $Tuple2(res1, res2)) | |
233 | + | } | |
234 | + | else throw("Strict value is not equal to itself.") | |
235 | + | } | |
236 | + | ||
237 | + | ||
238 | + | ||
239 | + | @Callable(i) | |
240 | + | func ensureCanGetOneTkn (caller) = { | |
241 | + | let checkCaller = mustPool(i) | |
242 | + | if ((checkCaller == checkCaller)) | |
243 | + | then { | |
244 | + | let ensureCanPut = match getInteger(poolContract, lastPutOneTknCall(caller)) { | |
245 | + | case int: Int => | |
246 | + | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
247 | + | let isReadyforPutOneTkn = (r >= permittedHeight) | |
248 | + | let needBlocks = (permittedHeight - r) | |
249 | + | if (isReadyforPutOneTkn) | |
250 | + | then true | |
251 | + | else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " ")) | |
252 | + | case _ => | |
253 | + | true | |
254 | + | } | |
255 | + | if ((ensureCanPut == ensureCanPut)) | |
256 | + | then { | |
257 | + | let ensureCanGet = match getInteger(poolContract, lastGetOneTknCall(caller)) { | |
258 | + | case int: Int => | |
259 | + | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
260 | + | let isReadyforGetOneTkn = (r >= permittedHeight) | |
261 | + | let needBlocks = (permittedHeight - r) | |
262 | + | if (isReadyforGetOneTkn) | |
263 | + | then true | |
264 | + | else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " ")) | |
265 | + | case _ => | |
266 | + | true | |
267 | + | } | |
268 | + | if ((ensureCanGet == ensureCanGet)) | |
269 | + | then { | |
270 | + | let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), r], nil) | |
271 | + | if ((setI == setI)) | |
272 | + | then nil | |
273 | + | else throw("Strict value is not equal to itself.") | |
274 | + | } | |
275 | + | else throw("Strict value is not equal to itself.") | |
276 | + | } | |
277 | + | else throw("Strict value is not equal to itself.") | |
278 | + | } | |
279 | + | else throw("Strict value is not equal to itself.") | |
280 | + | } | |
281 | + | ||
282 | + | ||
283 | + | ||
284 | + | @Callable(i) | |
285 | + | func ensureCanPutOneTkn (caller) = { | |
286 | + | let checkCaller = mustPool(i) | |
287 | + | if ((checkCaller == checkCaller)) | |
288 | + | then { | |
289 | + | let ensureCanPut = match getInteger(poolContract, lastPutOneTknCall(caller)) { | |
290 | + | case int: Int => | |
291 | + | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
292 | + | let isReadyforPutOneTkn = (r >= permittedHeight) | |
293 | + | let needBlocks = (permittedHeight - r) | |
294 | + | if (isReadyforPutOneTkn) | |
295 | + | then true | |
296 | + | else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " ")) | |
297 | + | case _ => | |
298 | + | true | |
299 | + | } | |
300 | + | if ((ensureCanPut == ensureCanPut)) | |
301 | + | then { | |
302 | + | let ensureCanGet = match getInteger(poolContract, lastGetOneTknCall(caller)) { | |
303 | + | case int: Int => | |
304 | + | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
305 | + | let isReadyforGetOneTkn = (r >= permittedHeight) | |
306 | + | let needBlocks = (permittedHeight - r) | |
307 | + | if (isReadyforGetOneTkn) | |
308 | + | then true | |
309 | + | else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " ")) | |
310 | + | case _ => | |
311 | + | true | |
312 | + | } | |
313 | + | if ((ensureCanGet == ensureCanGet)) | |
314 | + | then { | |
315 | + | let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), r], nil) | |
316 | + | if ((setI == setI)) | |
317 | + | then nil | |
318 | + | else throw("Strict value is not equal to itself.") | |
319 | + | } | |
320 | + | else throw("Strict value is not equal to itself.") | |
321 | + | } | |
322 | + | else throw("Strict value is not equal to itself.") | |
323 | + | } | |
324 | + | else throw("Strict value is not equal to itself.") | |
325 | + | } | |
326 | + | ||
327 | + | ||
328 | + | @Verifier(tx) | |
329 | + | func verify () = { | |
330 | + | let targetPublicKey = match managerPublicKeyOrUnit() { | |
331 | + | case pk: ByteVector => | |
332 | + | pk | |
333 | + | case _: Unit => | |
334 | + | tx.senderPublicKey | |
335 | + | case _ => | |
336 | + | throw("Match error") | |
337 | + | } | |
338 | + | match tx { | |
339 | + | case s: SetScriptTransaction => | |
340 | + | let newHash = blake2b256(value(s.script)) | |
341 | + | let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpStableAddonScriptHash()))) | |
342 | + | let currentHash = scriptHash(this) | |
343 | + | if (if ((allowedHash == newHash)) | |
344 | + | then (currentHash != newHash) | |
345 | + | else false) | |
346 | + | then true | |
347 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
348 | + | case _ => | |
349 | + | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
350 | + | } | |
351 | + | } | |
352 | + |
github/deemru/w8io/026f985 22.16 ms ◑