tx · 2QeYq4tsa6orhkn4cLuGsD57iqP6R7FmefoW9x7HbZ2h

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.03500000 Waves

2022.06.08 16:53 [2087474] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "2QeYq4tsa6orhkn4cLuGsD57iqP6R7FmefoW9x7HbZ2h", "fee": 3500000, "feeAssetId": null, "timestamp": 1654696432955, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "4Gi95sbw9oeTGYH73MTpRX7vmSN8Q1RpnW7SYz6ApBvvn8k1ds2T1kotkyb4ZtWQjFEGtZsoTb91NCKyyrfLhkoa" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgAAAAhAAAAAANTRVACAAAAAl9fAAAAAAVFTVBUWQIAAAAAAAAAAA5pZHhQb29sQWRkcmVzcwAAAAAAAAAAAQAAAAAJaWR4TFBBc0lkAAAAAAAAAAADAAAAAAlpZHhBbUFzSWQAAAAAAAAAAAQAAAAACWlkeFByQXNJZAAAAAAAAAAABQAAAAAPaWR4RmFjdFN0YWtDbnRyAAAAAAAAAAABAAAAAAVkZWxheQIAAAAJJXNfX2RlbGF5AQAAAAtrZXlGYWN0Q250cgAAAAACAAAAEyVzX19mYWN0b3J5Q29udHJhY3QBAAAAE2tleU1hbmFnZXJQdWJsaWNLZXkAAAAAAgAAABQlc19fbWFuYWdlclB1YmxpY0tleQEAAAAaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAAAAAgAAABslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBAAAAC2tleVBvb2xBZGRyAAAAAAIAAAAPJXNfX3Bvb2xBZGRyZXNzAQAAAA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IBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5pyjxuQ==", "chainId": 84, "height": 2087474, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AFS1mCWzWcF6e2753EkEzzhWHyvU1GVBGgf4WXFpQfxF Next: Dh6Z4BixHc1xSD6C1t2WK4WirHHVrkun1b9X44uin4Vx Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let EMPTY = ""
77
88 let idxPoolAddress = 1
99
1010 let idxLPAsId = 3
1111
1212 let idxAmAsId = 4
1313
1414 let idxPrAsId = 5
1515
1616 let idxFactStakCntr = 1
1717
1818 let delay = "%s__delay"
1919
2020 func keyFactCntr () = "%s__factoryContract"
2121
2222
2323 func keyManagerPublicKey () = "%s__managerPublicKey"
2424
2525
2626 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
2727
2828
2929 func keyPoolAddr () = "%s__poolAddress"
3030
3131
3232 func keyAmtAsset () = "%s__amountAsset"
3333
3434
3535 func keyPriceAsset () = "%s__priceAsset"
3636
3737
3838 func keyAdminPubKeys () = "%s__adminPubKeys"
3939
4040
4141 func keyAmp () = "%s__amp"
4242
4343
4444 func keyAmpHistory (height) = ("%s%d__amp__" + toString(height))
4545
4646
4747 func lastGetOrPutOneTknCall (caller) = makeString(["%s%s__lastGetOrPutOneTknCall", caller], SEP)
4848
4949
5050 func keyFactoryConfig () = "%s__factoryConfig"
5151
5252
5353 func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
5454
5555
5656 func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
5757
5858
5959 func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
6060
6161
6262 func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
6363
6464
6565 let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr()))
6666
6767 let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr()))
6868
6969 func getPoolConfig () = {
7070 let amtAs = getStringOrFail(poolContract, keyAmtAsset())
7171 let priceAs = getStringOrFail(poolContract, keyPriceAsset())
7272 let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs))
7373 let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs))
7474 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP)
7575 }
7676
7777
7878 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
7979
8080
8181 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
8282 case s: String =>
8383 fromBase58String(s)
8484 case _: Unit =>
8585 unit
8686 case _ =>
8787 throw("Match error")
8888 }
8989
9090
9191 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
9292 case s: String =>
9393 fromBase58String(s)
9494 case _: Unit =>
9595 unit
9696 case _ =>
9797 throw("Match error")
9898 }
9999
100100
101101 func mustManager (i) = {
102102 let pd = throw("Permission denied")
103103 match managerPublicKeyOrUnit() {
104104 case pk: ByteVector =>
105105 if ((i.callerPublicKey == pk))
106106 then true
107107 else pd
108108 case _: Unit =>
109109 if ((i.caller == this))
110110 then true
111111 else pd
112112 case _ =>
113113 throw("Match error")
114114 }
115115 }
116116
117117
118118 func getAdmins () = match getString(keyAdminPubKeys()) {
119119 case s: String =>
120120 if ((size(s) == 0))
121121 then nil
122122 else split(s, SEP)
123123 case _ =>
124124 nil
125125 }
126126
127127
128128 func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey)))
129129 then true
130130 else mustManager(i)
131131
132132
133133 func mustPool (i) = if ((i.caller == poolContract))
134134 then true
135135 else throw("caller must be the pool")
136136
137137
138138 @Callable(i)
139139 func constructor (poolAddress) = {
140140 let checkCaller = mustManager(i)
141141 if ((checkCaller == checkCaller))
142142 then [StringEntry(keyPoolAddr(), poolAddress)]
143143 else throw("Strict value is not equal to itself.")
144144 }
145145
146146
147147
148148 @Callable(i)
149149 func setManager (pendingManagerPublicKey) = {
150150 let checkCaller = mustManager(i)
151151 if ((checkCaller == checkCaller))
152152 then {
153153 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
154154 if ((checkManagerPublicKey == checkManagerPublicKey))
155155 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
156156 else throw("Strict value is not equal to itself.")
157157 }
158158 else throw("Strict value is not equal to itself.")
159159 }
160160
161161
162162
163163 @Callable(i)
164164 func confirmManager () = {
165165 let pm = pendingManagerPublicKeyOrUnit()
166166 let hasPM = if (isDefined(pm))
167167 then true
168168 else throw("No pending manager")
169169 if ((hasPM == hasPM))
170170 then {
171171 let checkPM = if ((i.callerPublicKey == value(pm)))
172172 then true
173173 else throw("You are not pending manager")
174174 if ((checkPM == checkPM))
175175 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
176176 else throw("Strict value is not equal to itself.")
177177 }
178178 else throw("Strict value is not equal to itself.")
179179 }
180180
181181
182182
183183 @Callable(i)
184184 func setAdmins (adminPubKeys) = {
185185 let checkCaller = mustManager(i)
186186 if ((checkCaller == checkCaller))
187187 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
188188 else throw("Strict value is not equal to itself.")
189189 }
190190
191191
192192
193193 @Callable(i)
194194 func unstakeAndGetOneTkn (amount,exchResult,notUsed,outAmount,outAssetId,slippage) = {
195195 let checkPayments = if ((size(i.payments) != 0))
196196 then throw("No pmnts expd")
197197 else true
198198 if ((checkPayments == checkPayments))
199199 then {
200200 let cfg = getPoolConfig()
201201 let factoryCfg = getFactoryConfig()
202202 let lpAssetId = fromBase58String(cfg[idxLPAsId])
203203 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
204204 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
205205 if ((unstakeInv == unstakeInv))
206206 then {
207207 let getOneTkn = reentrantInvoke(poolContract, "getOneTkn", [exchResult, notUsed, outAmount, outAssetId, slippage], [AttachedPayment(lpAssetId, amount)])
208208 if ((getOneTkn == getOneTkn))
209209 then nil
210210 else throw("Strict value is not equal to itself.")
211211 }
212212 else throw("Strict value is not equal to itself.")
213213 }
214214 else throw("Strict value is not equal to itself.")
215215 }
216216
217217
218218
219219 @Callable(i)
220220 func setAmp (amp) = {
221221 let checkCaller = mustAdmin(i)
222222 if ((checkCaller == checkCaller))
223223 then {
224224 let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil)
225225 let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil)
226226 $Tuple2(nil, $Tuple2(res1, res2))
227227 }
228228 else throw("Strict value is not equal to itself.")
229229 }
230230
231231
232232
233233 @Callable(i)
234234 func ensureCanGetOrPutOneTkn (caller) = {
235235 let checkCaller = mustPool(i)
236236 if ((checkCaller == checkCaller))
237237 then {
238238 let ensureCanPut = match getInteger(poolContract, lastGetOrPutOneTknCall(caller)) {
239239 case int: Int =>
240240 let permittedHeight = (int + value(getInteger(poolContract, delay)))
241241 let isReadyforPutOneTkn = (height >= permittedHeight)
242242 let needBlocks = (permittedHeight - height)
243243 if (isReadyforPutOneTkn)
244244 then true
245245 else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " "))
246246 case _ =>
247247 true
248248 }
249249 if ((ensureCanPut == ensureCanPut))
250250 then {
251251 let setI = invoke(poolContract, "setI", [lastGetOrPutOneTknCall(caller), height], nil)
252252 if ((setI == setI))
253253 then nil
254254 else throw("Strict value is not equal to itself.")
255255 }
256256 else throw("Strict value is not equal to itself.")
257257 }
258258 else throw("Strict value is not equal to itself.")
259259 }
260260
261261
262262 @Verifier(tx)
263263 func verify () = {
264264 let targetPublicKey = match managerPublicKeyOrUnit() {
265265 case pk: ByteVector =>
266266 pk
267267 case _: Unit =>
268268 tx.senderPublicKey
269269 case _ =>
270270 throw("Match error")
271271 }
272272 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
273273 }
274274

github/deemru/w8io/169f3d6 
42.40 ms