tx · EsNStvWFgAhkLUfecsAnn4Kx1WoAkCsgDyDSKYv2DBa4

3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV:  -0.01400000 Waves

2022.05.30 10:23 [2074092] smart account 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV > SELF 0.00000000 Waves

{ "type": 13, "id": "EsNStvWFgAhkLUfecsAnn4Kx1WoAkCsgDyDSKYv2DBa4", "fee": 1400000, "feeAssetId": null, "timestamp": 1653895455831, "version": 1, "sender": "3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV", "senderPublicKey": "8KXPjDuC8ffL9qjNuDBLnkvJKbMojhZYcnm2o75UCyun", "proofs": [ "3jtsHkB4tncX1fPq3DXBVp8Y1JufQnVeEdSd4JXu3jJPUgCDx81XpLw2CSziSGTQoLNJUvKNp1J2NWLzKHhupnKG" ], "script": "base64:AAIFAAAAAAAAACwIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCAAAACIAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAAlpZHhMUEFzSWQAAAAAAAAAAAMAAAAACWlkeEFtQXNJZAAAAAAAAAAABAAAAAAJaWR4UHJBc0lkAAAAAAAAAAAFAAAAAA9pZHhGYWN0U3Rha0NudHIAAAAAAAAAAAEAAAAABWRlbGF5AgAAAAklc19fZGVsYXkBAAAAC2tleUZhY3RDbnRyAAAAAAIAAAATJXNfX2ZhY3RvcnlDb250cmFjdAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAACAAAAGyVzX19wZW5kaW5nTWFuYWdlclB1YmxpY0tleQEAAAALa2V5UG9vbEFkZHIAAAAAAgAAAA8lc19fcG9vbEFkZHJlc3MBAAAAC2tleUFtdEFzc2V0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AgAAAARVbml0CAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5Kf3N7w==", "chainId": 84, "height": 2074092, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: dJL67ZGyK1KqtQixH5GEzaSwPQymYuMZgbm1rW2zZXe Next: 5qRkFeF7TGmCcHCbDYBNCq5axcdWKNQpz57Ac59kSBkg Diff:
OldNewDifferences
133133 else mustManager(i)
134134
135135
136+func mustPool (i) = if ((i.caller == poolContract))
137+ then true
138+ else throw("caller must be the pool")
139+
140+
136141 @Callable(i)
137142 func constructor (poolAddress) = {
138143 let checkCaller = mustManager(i)
230235
231236 @Callable(i)
232237 func ensureCanGetOneTkn (caller) = {
233- let checkCaller = mustAdmin(i)
238+ let checkCaller = mustPool(i)
234239 if ((checkCaller == checkCaller))
235240 then {
236241 let ensure = match getInteger(poolContract, lastGetOneTknCall(caller)) {
256261
257262 @Callable(i)
258263 func ensureCanPutOneTkn (caller) = {
259- let checkCaller = mustAdmin(i)
264+ let checkCaller = mustPool(i)
260265 if ((checkCaller == checkCaller))
261266 then {
262267 let ensure = match getInteger(poolContract, lastPutOneTknCall(caller)) {
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 lastGetOneTknCall (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP)
4848
4949
5050 func lastPutOneTknCall (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP)
5151
5252
5353 func keyFactoryConfig () = "%s__factoryConfig"
5454
5555
5656 func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
5757
5858
5959 func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
6060
6161
6262 func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
6363
6464
6565 func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
6666
6767
6868 let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr()))
6969
7070 let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr()))
7171
7272 func getPoolConfig () = {
7373 let amtAs = getStringOrFail(poolContract, keyAmtAsset())
7474 let priceAs = getStringOrFail(poolContract, keyPriceAsset())
7575 let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs))
7676 let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs))
7777 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP)
7878 }
7979
8080
8181 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
8282
8383
8484 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
8585 case s: String =>
8686 fromBase58String(s)
8787 case _: Unit =>
8888 unit
8989 case _ =>
9090 throw("Match error")
9191 }
9292
9393
9494 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
9595 case s: String =>
9696 fromBase58String(s)
9797 case _: Unit =>
9898 unit
9999 case _ =>
100100 throw("Match error")
101101 }
102102
103103
104104 func mustManager (i) = {
105105 let pd = throw("Permission denied addon")
106106 match managerPublicKeyOrUnit() {
107107 case pk: ByteVector =>
108108 if ((i.callerPublicKey == pk))
109109 then true
110110 else pd
111111 case _: Unit =>
112112 if ((i.caller == this))
113113 then true
114114 else pd
115115 case _ =>
116116 throw("Match error")
117117 }
118118 }
119119
120120
121121 func getAdmins () = match getString(keyAdminPubKeys()) {
122122 case s: String =>
123123 if ((size(s) == 0))
124124 then nil
125125 else split(s, SEP)
126126 case _ =>
127127 nil
128128 }
129129
130130
131131 func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey)))
132132 then true
133133 else mustManager(i)
134134
135135
136+func mustPool (i) = if ((i.caller == poolContract))
137+ then true
138+ else throw("caller must be the pool")
139+
140+
136141 @Callable(i)
137142 func constructor (poolAddress) = {
138143 let checkCaller = mustManager(i)
139144 if ((checkCaller == checkCaller))
140145 then [StringEntry(keyPoolAddr(), poolAddress)]
141146 else throw("Strict value is not equal to itself.")
142147 }
143148
144149
145150
146151 @Callable(i)
147152 func setManager (pendingManagerPublicKey) = {
148153 let checkCaller = mustManager(i)
149154 if ((checkCaller == checkCaller))
150155 then {
151156 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
152157 if ((checkManagerPublicKey == checkManagerPublicKey))
153158 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
154159 else throw("Strict value is not equal to itself.")
155160 }
156161 else throw("Strict value is not equal to itself.")
157162 }
158163
159164
160165
161166 @Callable(i)
162167 func confirmManager () = {
163168 let pm = pendingManagerPublicKeyOrUnit()
164169 let hasPM = if (isDefined(pm))
165170 then true
166171 else throw("No pending manager")
167172 if ((hasPM == hasPM))
168173 then {
169174 let checkPM = if ((i.callerPublicKey == value(pm)))
170175 then true
171176 else throw("You are not pending manager")
172177 if ((checkPM == checkPM))
173178 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
174179 else throw("Strict value is not equal to itself.")
175180 }
176181 else throw("Strict value is not equal to itself.")
177182 }
178183
179184
180185
181186 @Callable(i)
182187 func setAdmins (adminPubKeys) = {
183188 let checkCaller = mustManager(i)
184189 if ((checkCaller == checkCaller))
185190 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
186191 else throw("Strict value is not equal to itself.")
187192 }
188193
189194
190195
191196 @Callable(i)
192197 func unstakeAndGetOneTkn (amount,exchResult,notUsed,outAmount,outAssetId,slippage) = {
193198 let checkPayments = if ((size(i.payments) != 0))
194199 then throw("No pmnts expd")
195200 else true
196201 if ((checkPayments == checkPayments))
197202 then {
198203 let cfg = getPoolConfig()
199204 let factoryCfg = getFactoryConfig()
200205 let lpAssetId = fromBase58String(cfg[idxLPAsId])
201206 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
202207 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
203208 if ((unstakeInv == unstakeInv))
204209 then {
205210 let getOneTkn = invoke(poolContract, "getOneTkn", [exchResult, notUsed, outAmount, outAssetId, slippage], [AttachedPayment(lpAssetId, amount)])
206211 if ((getOneTkn == getOneTkn))
207212 then nil
208213 else throw("Strict value is not equal to itself.")
209214 }
210215 else throw("Strict value is not equal to itself.")
211216 }
212217 else throw("Strict value is not equal to itself.")
213218 }
214219
215220
216221
217222 @Callable(i)
218223 func setAmp (amp) = {
219224 let checkCaller = mustAdmin(i)
220225 if ((checkCaller == checkCaller))
221226 then {
222227 let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil)
223228 let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil)
224229 $Tuple2(nil, $Tuple2(res1, res2))
225230 }
226231 else throw("Strict value is not equal to itself.")
227232 }
228233
229234
230235
231236 @Callable(i)
232237 func ensureCanGetOneTkn (caller) = {
233- let checkCaller = mustAdmin(i)
238+ let checkCaller = mustPool(i)
234239 if ((checkCaller == checkCaller))
235240 then {
236241 let ensure = match getInteger(poolContract, lastGetOneTknCall(caller)) {
237242 case int: Int =>
238243 let permittedHeight = (int + value(getInteger(poolContract, delay)))
239244 let isReadyforGetOneTkn = (permittedHeight >= height)
240245 let needBlocks = (permittedHeight - height)
241246 if (isReadyforGetOneTkn)
242247 then true
243248 else throw(makeString(["wait for", toString(needBlocks), "block(s) more"], " "))
244249 case _ =>
245250 true
246251 }
247252 let setI = invoke(poolContract, "setI", [lastGetOneTknCall(caller), height], nil)
248253 if ((setI == setI))
249254 then $Tuple2(nil, ensure)
250255 else throw("Strict value is not equal to itself.")
251256 }
252257 else throw("Strict value is not equal to itself.")
253258 }
254259
255260
256261
257262 @Callable(i)
258263 func ensureCanPutOneTkn (caller) = {
259- let checkCaller = mustAdmin(i)
264+ let checkCaller = mustPool(i)
260265 if ((checkCaller == checkCaller))
261266 then {
262267 let ensure = match getInteger(poolContract, lastPutOneTknCall(caller)) {
263268 case int: Int =>
264269 let permittedHeight = (int + value(getInteger(poolContract, delay)))
265270 let isReadyforPutOneTkn = (permittedHeight >= height)
266271 let needBlocks = (permittedHeight - height)
267272 if (isReadyforPutOneTkn)
268273 then true
269274 else throw(makeString(["wait for", toString(needBlocks), "block(s) more"], " "))
270275 case _ =>
271276 true
272277 }
273278 let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), height], nil)
274279 if ((setI == setI))
275280 then $Tuple2(nil, ensure)
276281 else throw("Strict value is not equal to itself.")
277282 }
278283 else throw("Strict value is not equal to itself.")
279284 }
280285
281286
282287 @Verifier(tx)
283288 func verify () = {
284289 let targetPublicKey = match managerPublicKeyOrUnit() {
285290 case pk: ByteVector =>
286291 pk
287292 case _: Unit =>
288293 tx.senderPublicKey
289294 case _ =>
290295 throw("Match error")
291296 }
292297 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
293298 }
294299

github/deemru/w8io/169f3d6 
39.08 ms