tx · BhSDvCcL11XC4hWSpPrax8TRYgAT91jWWWKwHb4ayoTb

3My57GB3ge7XtaAMqc3QMHYmHw5wyxEqWyd:  -0.01000000 Waves

2022.06.06 08:41 [2084092] smart account 3My57GB3ge7XtaAMqc3QMHYmHw5wyxEqWyd > SELF 0.00000000 Waves

{ "type": 13, "id": "BhSDvCcL11XC4hWSpPrax8TRYgAT91jWWWKwHb4ayoTb", "fee": 1000000, "feeAssetId": null, "timestamp": 1654494107485, "version": 1, "sender": "3My57GB3ge7XtaAMqc3QMHYmHw5wyxEqWyd", "senderPublicKey": "3n1MmdMKYw8xBhJPebRrNC3DzTdTg5nboqo1d4T2xLTG", "proofs": [ "66ECfEMjDmPs25ntLLMx5zxUSNfkLxCtK7wG6mMYkCH5ZsVtYyLNp3nKVstcxH4WKL9NuyLVWJG4wsK6vQH2Q5xT" ], "script": "base64:AAIFAAAAAAAABC4IAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCCIDU0VQIgVFTVBUWSIOaWR4UG9vbEFkZHJlc3MiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiD2lkeEZhY3RTdGFrQ250ciIFZGVsYXkiC2tleUZhY3RDbnRyIhNrZXlNYW5hZ2VyUHVibGljS2V5IhprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleSILa2V5UG9vbEFkZHIiC2tleUFtdEFzc2V0Ig1rZXlQcmljZUFzc2V0Ig9rZXlBZG1pblB1YktleXMiBmtleUFtcCINa2V5QW1wSGlzdG9yeSIGaGVpZ2h0IhFsYXN0R2V0T25lVGtuQ2FsbCIGY2FsbGVyIhFsYXN0UHV0T25lVGtuQ2FsbCIQa2V5RmFjdG9yeUNvbmZpZyINa2V5UG9vbENvbmZpZyIGaUFtdEFzIgVpUHJBcyIfa2V5TWFwcGluZ3NCYXNlQXNzZXQyaW50ZXJuYWxJZCIFYkFTdHIiD2dldFN0cmluZ09yRmFpbCIEYWRkci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AAAAAAIFAAAAAmFDBQAAAAJhQwUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACYUQBAAAAAmFFAAAAAAQAAAACYUYEAAAAAU4JAQAAAAFNAAAAAAMJAAABAAAAAgUAAAABTgIAAAAKQnl0ZVZlY3RvcgQAAAABVAUAAAABTgUAAAABVAMJAAABAAAAAgUAAAABTgIAAAAEVW5pdAgFAAAAAmFEAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACYUQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJhRAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFG0lzRaA==", "chainId": 84, "height": 2084092, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 5V44Y5meWuqF8XGuckBtNi79qdccqxSNS5GSfkrJ9vdj Full:
OldNewDifferences
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 getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
63+
64+
65+func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
66+
67+
68+let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr()))
69+
70+let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr()))
71+
72+func getPoolConfig () = {
73+ let amtAs = getStringOrFail(poolContract, keyAmtAsset())
74+ let priceAs = getStringOrFail(poolContract, keyPriceAsset())
75+ let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs))
76+ let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs))
77+ split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP)
78+ }
79+
80+
81+func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
82+
83+
84+func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
85+ case s: String =>
86+ fromBase58String(s)
87+ case _: Unit =>
88+ unit
89+ case _ =>
90+ throw("Match error")
91+}
92+
93+
94+func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
95+ case s: String =>
96+ fromBase58String(s)
97+ case _: Unit =>
98+ unit
99+ case _ =>
100+ throw("Match error")
101+}
102+
103+
104+func mustManager (i) = {
105+ let pd = throw("Permission denied")
106+ match managerPublicKeyOrUnit() {
107+ case pk: ByteVector =>
108+ if ((i.callerPublicKey == pk))
109+ then true
110+ else pd
111+ case _: Unit =>
112+ if ((i.caller == this))
113+ then true
114+ else pd
115+ case _ =>
116+ throw("Match error")
117+ }
118+ }
119+
120+
121+func getAdmins () = match getString(keyAdminPubKeys()) {
122+ case s: String =>
123+ if ((size(s) == 0))
124+ then nil
125+ else split(s, SEP)
126+ case _ =>
127+ nil
128+}
129+
130+
131+func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey)))
132+ then true
133+ else mustManager(i)
134+
135+
136+func mustPool (i) = if ((i.caller == poolContract))
137+ then true
138+ else throw("caller must be the pool")
139+
140+
141+@Callable(i)
142+func constructor (poolAddress) = {
143+ let checkCaller = mustManager(i)
144+ if ((checkCaller == checkCaller))
145+ then [StringEntry(keyPoolAddr(), poolAddress)]
146+ else throw("Strict value is not equal to itself.")
147+ }
148+
149+
150+
151+@Callable(i)
152+func setManager (pendingManagerPublicKey) = {
153+ let checkCaller = mustManager(i)
154+ if ((checkCaller == checkCaller))
155+ then {
156+ let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
157+ if ((checkManagerPublicKey == checkManagerPublicKey))
158+ then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
159+ else throw("Strict value is not equal to itself.")
160+ }
161+ else throw("Strict value is not equal to itself.")
162+ }
163+
164+
165+
166+@Callable(i)
167+func confirmManager () = {
168+ let pm = pendingManagerPublicKeyOrUnit()
169+ let hasPM = if (isDefined(pm))
170+ then true
171+ else throw("No pending manager")
172+ if ((hasPM == hasPM))
173+ then {
174+ let checkPM = if ((i.callerPublicKey == value(pm)))
175+ then true
176+ else throw("You are not pending manager")
177+ if ((checkPM == checkPM))
178+ then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
179+ else throw("Strict value is not equal to itself.")
180+ }
181+ else throw("Strict value is not equal to itself.")
182+ }
183+
184+
185+
186+@Callable(i)
187+func setAdmins (adminPubKeys) = {
188+ let checkCaller = mustManager(i)
189+ if ((checkCaller == checkCaller))
190+ then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
191+ else throw("Strict value is not equal to itself.")
192+ }
193+
194+
195+
196+@Callable(i)
197+func unstakeAndGetOneTkn (amount,exchResult,notUsed,outAmount,outAssetId,slippage) = {
198+ let checkPayments = if ((size(i.payments) != 0))
199+ then throw("No pmnts expd")
200+ else true
201+ if ((checkPayments == checkPayments))
202+ then {
203+ let cfg = getPoolConfig()
204+ let factoryCfg = getFactoryConfig()
205+ let lpAssetId = fromBase58String(cfg[idxLPAsId])
206+ let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
207+ let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
208+ if ((unstakeInv == unstakeInv))
209+ then {
210+ let getOneTkn = invoke(poolContract, "getOneTkn", [exchResult, notUsed, outAmount, outAssetId, slippage], [AttachedPayment(lpAssetId, amount)])
211+ if ((getOneTkn == getOneTkn))
212+ then nil
213+ else throw("Strict value is not equal to itself.")
214+ }
215+ else throw("Strict value is not equal to itself.")
216+ }
217+ else throw("Strict value is not equal to itself.")
218+ }
219+
220+
221+
222+@Callable(i)
223+func setAmp (amp) = {
224+ let checkCaller = mustAdmin(i)
225+ if ((checkCaller == checkCaller))
226+ then {
227+ let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil)
228+ let res2 = invoke(poolContract, "setS", [keyAmpHistory(r), amp], nil)
229+ $Tuple2(nil, $Tuple2(res1, res2))
230+ }
231+ else throw("Strict value is not equal to itself.")
232+ }
233+
234+
235+
236+@Callable(i)
237+func ensureCanGetOneTkn (caller) = {
238+ let checkCaller = mustPool(i)
239+ if ((checkCaller == checkCaller))
240+ then {
241+ let ensureCanPut = match getInteger(poolContract, lastPutOneTknCall(caller)) {
242+ case int: Int =>
243+ let permittedHeight = (int + value(getInteger(poolContract, delay)))
244+ let isReadyforPutOneTkn = (r >= permittedHeight)
245+ let needBlocks = (permittedHeight - r)
246+ if (isReadyforPutOneTkn)
247+ then true
248+ else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " "))
249+ case _ =>
250+ true
251+ }
252+ if ((ensureCanPut == ensureCanPut))
253+ then {
254+ let ensureCanGet = match getInteger(poolContract, lastGetOneTknCall(caller)) {
255+ case int: Int =>
256+ let permittedHeight = (int + value(getInteger(poolContract, delay)))
257+ let isReadyforGetOneTkn = (r >= permittedHeight)
258+ let needBlocks = (permittedHeight - r)
259+ if (isReadyforGetOneTkn)
260+ then true
261+ else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " "))
262+ case _ =>
263+ true
264+ }
265+ if ((ensureCanGet == ensureCanGet))
266+ then {
267+ let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), r], nil)
268+ if ((setI == setI))
269+ then nil
270+ else throw("Strict value is not equal to itself.")
271+ }
272+ else throw("Strict value is not equal to itself.")
273+ }
274+ else throw("Strict value is not equal to itself.")
275+ }
276+ else throw("Strict value is not equal to itself.")
277+ }
278+
279+
280+
281+@Callable(i)
282+func ensureCanPutOneTkn (caller) = {
283+ let checkCaller = mustPool(i)
284+ if ((checkCaller == checkCaller))
285+ then {
286+ let ensureCanPut = match getInteger(poolContract, lastPutOneTknCall(caller)) {
287+ case int: Int =>
288+ let permittedHeight = (int + value(getInteger(poolContract, delay)))
289+ let isReadyforPutOneTkn = (r >= permittedHeight)
290+ let needBlocks = (permittedHeight - r)
291+ if (isReadyforPutOneTkn)
292+ then true
293+ else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " "))
294+ case _ =>
295+ true
296+ }
297+ if ((ensureCanPut == ensureCanPut))
298+ then {
299+ let ensureCanGet = match getInteger(poolContract, lastGetOneTknCall(caller)) {
300+ case int: Int =>
301+ let permittedHeight = (int + value(getInteger(poolContract, delay)))
302+ let isReadyforGetOneTkn = (r >= permittedHeight)
303+ let needBlocks = (permittedHeight - r)
304+ if (isReadyforGetOneTkn)
305+ then true
306+ else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " "))
307+ case _ =>
308+ true
309+ }
310+ if ((ensureCanGet == ensureCanGet))
311+ then {
312+ let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), r], nil)
313+ if ((setI == setI))
314+ then nil
315+ else throw("Strict value is not equal to itself.")
316+ }
317+ else throw("Strict value is not equal to itself.")
318+ }
319+ else throw("Strict value is not equal to itself.")
320+ }
321+ else throw("Strict value is not equal to itself.")
322+ }
323+
324+
325+@Verifier(tx)
326+func verify () = {
327+ let targetPublicKey = match managerPublicKeyOrUnit() {
328+ case pk: ByteVector =>
329+ pk
330+ case _: Unit =>
331+ tx.senderPublicKey
332+ case _ =>
333+ throw("Match error")
334+ }
335+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
336+ }
337+

github/deemru/w8io/169f3d6 
33.26 ms