tx · HbaQ4XcRQzqCJnaoTdp9uqEjHDpQMV9cnYcdsD3d9dvk

3N6BogmeefYY8WZkxX8cLij7Sd1H7mkWAKL:  -0.01000000 Waves

2022.05.31 20:30 [2076133] smart account 3N6BogmeefYY8WZkxX8cLij7Sd1H7mkWAKL > SELF 0.00000000 Waves

{ "type": 13, "id": "HbaQ4XcRQzqCJnaoTdp9uqEjHDpQMV9cnYcdsD3d9dvk", "fee": 1000000, "feeAssetId": null, "timestamp": 1654018221840, "version": 1, "sender": "3N6BogmeefYY8WZkxX8cLij7Sd1H7mkWAKL", "senderPublicKey": "2oJMYLGBFHyrvKtf5nekg3ycc9Aa3h7i9riwRPycfNHE", "proofs": [ "4DtJ3nua9MiumNjEMWEhhqe8k4ebf29oN7qysyC4jpphpu3iQFrUezDbfK17zdFJazpx8kiBquiLwoyGzXwo1fCE" ], "script": "base64:AAIFAAAAAAAABfIIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCBoKCgFBEgViQVN0choUCgFCEg9nZXRTdHJpbmdPckZhaWwaCQoBQxIEYWRkchoICgFEEgNrZXkaEQoBRRIMZ2V0SW50T3JGYWlsGhEKAUYSDHBvb2xDb250cmFjdBoUCgFHEg9mYWN0b3J5Q29udHJhY3QaEgoBSBINZ2V0UG9vbENvbmZpZxoKCgFJEgVhbXRBcxoMCgFKEgdwcmljZUFzGg0KAUsSCGlQcmljZUFzGhUKAUwSEGdldEZhY3RvcnlDb25maWcaGwoBTRIWbWFuYWdlclB1YmxpY0tleU9yVW5pdBoMCgFOEgckbWF0Y2gwGgYKAU8SAXMaIgoBUBIdcGVuZGluZ01hbmFnZXJQdWJsaWNLZXlPclVuaXQaEAoBURILbXVzdE1hbmFnZXIaBgoBUhIBaRoHCgFTEgJwZBoHCgFUEgJwaxoOCgFVEglnZXRBZG1pbnMaDgoBVhIJbXVzdEFkbWluGg0KAVcSCG11c3RQb29sGhAKAVgSC3Bvb2xBZGRyZXNzGhA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5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJhRAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmFEAAAABnByb29mcwAAAAAAAAAAAAUAAAACYUYk8p+J", "chainId": 84, "height": 2076133, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: H1RDLZQyuzdDJs3HGBYQTZoQqsaM89VNyCmHZV2Muvyd 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 
32.15 ms