tx · FCMsdYHEAHVw7JbPcHqYg1Gaet3aKFjrswKH5YN9w2D2

3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV:  -0.01400000 Waves

2022.05.20 17:32 [2060128] smart account 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV > SELF 0.00000000 Waves

{ "type": 13, "id": "FCMsdYHEAHVw7JbPcHqYg1Gaet3aKFjrswKH5YN9w2D2", "fee": 1400000, "feeAssetId": null, "timestamp": 1653057186825, "version": 1, "sender": "3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV", "senderPublicKey": "8KXPjDuC8ffL9qjNuDBLnkvJKbMojhZYcnm2o75UCyun", "proofs": [ "4da8bFbz6yFmen2eS83pC1iYA7FaeZsE3Zump3Ax9TyxEnTTCWGL2vaggaJ9kBUa6EZCeCuEmUR32cKiWoYjMB7g" ], "script": "base64:AAIFAAAAAAAAACwIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCAAAACEAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAAlpZHhMUEFzSWQAAAAAAAAAAAMAAAAACWlkeEFtQXNJZAAAAAAAAAAABAAAAAAJaWR4UHJBc0lkAAAAAAAAAAAFAAAAAA9pZHhGYWN0U3Rha0NudHIAAAAAAAAAAAEAAAAABWRlbGF5AgAAAAklc19fZGVsYXkBAAAAC2tleUZhY3RDbnRyAAAAAAIAAAATJXNfX2ZhY3RvcnlDb250cmFjdAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAACAAAAGyVzX19wZW5kaW5nTWFuYWdlclB1YmxpY0tleQEAAAALa2V5UG9vbEFkZHIAAAAAAgAAAA8lc19fcG9vbEFkZHJlc3MBAAAAC2tleUFtdEFzc2V0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AAAAAABQAAAA90YXJnZXRQdWJsaWNLZXkF2tq6", "chainId": 84, "height": 2060128, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6hLM1g1dBSXmi7moRH4rp93bBYSKEob1JZ39MZTeBp6Y Next: dJL67ZGyK1KqtQixH5GEzaSwPQymYuMZgbm1rW2zZXe Diff:
OldNewDifferences
1414 let idxPrAsId = 5
1515
1616 let idxFactStakCntr = 1
17+
18+let delay = "%s__delay"
1719
1820 func keyFactCntr () = "%s__factoryContract"
1921
4042
4143
4244 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)
4351
4452
4553 func keyFactoryConfig () = "%s__factoryConfig"
219227 }
220228
221229
230+
231+@Callable(i)
232+func ensureCanGetOneTkn (caller) = {
233+ let checkCaller = mustAdmin(i)
234+ if ((checkCaller == checkCaller))
235+ then {
236+ let ensure = match getInteger(poolContract, lastGetOneTknCall(caller)) {
237+ case int: Int =>
238+ let permittedHeight = (int + value(getInteger(poolContract, delay)))
239+ let isReadyforGetOneTkn = (permittedHeight >= height)
240+ let needBlocks = (permittedHeight - height)
241+ if (isReadyforGetOneTkn)
242+ then true
243+ else throw(makeString(["wait for", toString(needBlocks), "block(s) more"], " "))
244+ case _ =>
245+ true
246+ }
247+ let setI = invoke(poolContract, "setI", [lastGetOneTknCall(caller), height], nil)
248+ if ((setI == setI))
249+ then $Tuple2(nil, ensure)
250+ else throw("Strict value is not equal to itself.")
251+ }
252+ else throw("Strict value is not equal to itself.")
253+ }
254+
255+
256+
257+@Callable(i)
258+func ensureCanPutOneTkn (caller) = {
259+ let checkCaller = mustAdmin(i)
260+ if ((checkCaller == checkCaller))
261+ then {
262+ let ensure = match getInteger(poolContract, lastPutOneTknCall(caller)) {
263+ case int: Int =>
264+ let permittedHeight = (int + value(getInteger(poolContract, delay)))
265+ let isReadyforPutOneTkn = (permittedHeight >= height)
266+ let needBlocks = (permittedHeight - height)
267+ if (isReadyforPutOneTkn)
268+ then true
269+ else throw(makeString(["wait for", toString(needBlocks), "block(s) more"], " "))
270+ case _ =>
271+ true
272+ }
273+ let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), height], nil)
274+ if ((setI == setI))
275+ then $Tuple2(nil, ensure)
276+ else throw("Strict value is not equal to itself.")
277+ }
278+ else throw("Strict value is not equal to itself.")
279+ }
280+
281+
222282 @Verifier(tx)
223283 func verify () = {
224284 let targetPublicKey = match managerPublicKeyOrUnit() {
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
17+
18+let delay = "%s__delay"
1719
1820 func keyFactCntr () = "%s__factoryContract"
1921
2022
2123 func keyManagerPublicKey () = "%s__managerPublicKey"
2224
2325
2426 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
2527
2628
2729 func keyPoolAddr () = "%s__poolAddress"
2830
2931
3032 func keyAmtAsset () = "%s__amountAsset"
3133
3234
3335 func keyPriceAsset () = "%s__priceAsset"
3436
3537
3638 func keyAdminPubKeys () = "%s__adminPubKeys"
3739
3840
3941 func keyAmp () = "%s__amp"
4042
4143
4244 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)
4351
4452
4553 func keyFactoryConfig () = "%s__factoryConfig"
4654
4755
4856 func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
4957
5058
5159 func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
5260
5361
5462 func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
5563
5664
5765 func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
5866
5967
6068 let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr()))
6169
6270 let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr()))
6371
6472 func getPoolConfig () = {
6573 let amtAs = getStringOrFail(poolContract, keyAmtAsset())
6674 let priceAs = getStringOrFail(poolContract, keyPriceAsset())
6775 let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs))
6876 let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs))
6977 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP)
7078 }
7179
7280
7381 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
7482
7583
7684 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
7785 case s: String =>
7886 fromBase58String(s)
7987 case _: Unit =>
8088 unit
8189 case _ =>
8290 throw("Match error")
8391 }
8492
8593
8694 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
8795 case s: String =>
8896 fromBase58String(s)
8997 case _: Unit =>
9098 unit
9199 case _ =>
92100 throw("Match error")
93101 }
94102
95103
96104 func mustManager (i) = {
97105 let pd = throw("Permission denied")
98106 match managerPublicKeyOrUnit() {
99107 case pk: ByteVector =>
100108 if ((i.callerPublicKey == pk))
101109 then true
102110 else pd
103111 case _: Unit =>
104112 if ((i.caller == this))
105113 then true
106114 else pd
107115 case _ =>
108116 throw("Match error")
109117 }
110118 }
111119
112120
113121 func getAdmins () = match getString(keyAdminPubKeys()) {
114122 case s: String =>
115123 if ((size(s) == 0))
116124 then nil
117125 else split(s, SEP)
118126 case _ =>
119127 nil
120128 }
121129
122130
123131 func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey)))
124132 then true
125133 else mustManager(i)
126134
127135
128136 @Callable(i)
129137 func constructor (poolAddress) = {
130138 let checkCaller = mustManager(i)
131139 if ((checkCaller == checkCaller))
132140 then [StringEntry(keyPoolAddr(), poolAddress)]
133141 else throw("Strict value is not equal to itself.")
134142 }
135143
136144
137145
138146 @Callable(i)
139147 func setManager (pendingManagerPublicKey) = {
140148 let checkCaller = mustManager(i)
141149 if ((checkCaller == checkCaller))
142150 then {
143151 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
144152 if ((checkManagerPublicKey == checkManagerPublicKey))
145153 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
146154 else throw("Strict value is not equal to itself.")
147155 }
148156 else throw("Strict value is not equal to itself.")
149157 }
150158
151159
152160
153161 @Callable(i)
154162 func confirmManager () = {
155163 let pm = pendingManagerPublicKeyOrUnit()
156164 let hasPM = if (isDefined(pm))
157165 then true
158166 else throw("No pending manager")
159167 if ((hasPM == hasPM))
160168 then {
161169 let checkPM = if ((i.callerPublicKey == value(pm)))
162170 then true
163171 else throw("You are not pending manager")
164172 if ((checkPM == checkPM))
165173 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
166174 else throw("Strict value is not equal to itself.")
167175 }
168176 else throw("Strict value is not equal to itself.")
169177 }
170178
171179
172180
173181 @Callable(i)
174182 func setAdmins (adminPubKeys) = {
175183 let checkCaller = mustManager(i)
176184 if ((checkCaller == checkCaller))
177185 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
178186 else throw("Strict value is not equal to itself.")
179187 }
180188
181189
182190
183191 @Callable(i)
184192 func unstakeAndGetOneTkn (amount,exchResult,notUsed,outAmount,outAssetId,slippage) = {
185193 let checkPayments = if ((size(i.payments) != 0))
186194 then throw("No pmnts expd")
187195 else true
188196 if ((checkPayments == checkPayments))
189197 then {
190198 let cfg = getPoolConfig()
191199 let factoryCfg = getFactoryConfig()
192200 let lpAssetId = fromBase58String(cfg[idxLPAsId])
193201 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
194202 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
195203 if ((unstakeInv == unstakeInv))
196204 then {
197205 let getOneTkn = invoke(poolContract, "getOneTkn", [exchResult, notUsed, outAmount, outAssetId, slippage], [AttachedPayment(lpAssetId, amount)])
198206 if ((getOneTkn == getOneTkn))
199207 then nil
200208 else throw("Strict value is not equal to itself.")
201209 }
202210 else throw("Strict value is not equal to itself.")
203211 }
204212 else throw("Strict value is not equal to itself.")
205213 }
206214
207215
208216
209217 @Callable(i)
210218 func setAmp (amp) = {
211219 let checkCaller = mustAdmin(i)
212220 if ((checkCaller == checkCaller))
213221 then {
214222 let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil)
215223 let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil)
216224 $Tuple2(nil, $Tuple2(res1, res2))
217225 }
218226 else throw("Strict value is not equal to itself.")
219227 }
220228
221229
230+
231+@Callable(i)
232+func ensureCanGetOneTkn (caller) = {
233+ let checkCaller = mustAdmin(i)
234+ if ((checkCaller == checkCaller))
235+ then {
236+ let ensure = match getInteger(poolContract, lastGetOneTknCall(caller)) {
237+ case int: Int =>
238+ let permittedHeight = (int + value(getInteger(poolContract, delay)))
239+ let isReadyforGetOneTkn = (permittedHeight >= height)
240+ let needBlocks = (permittedHeight - height)
241+ if (isReadyforGetOneTkn)
242+ then true
243+ else throw(makeString(["wait for", toString(needBlocks), "block(s) more"], " "))
244+ case _ =>
245+ true
246+ }
247+ let setI = invoke(poolContract, "setI", [lastGetOneTknCall(caller), height], nil)
248+ if ((setI == setI))
249+ then $Tuple2(nil, ensure)
250+ else throw("Strict value is not equal to itself.")
251+ }
252+ else throw("Strict value is not equal to itself.")
253+ }
254+
255+
256+
257+@Callable(i)
258+func ensureCanPutOneTkn (caller) = {
259+ let checkCaller = mustAdmin(i)
260+ if ((checkCaller == checkCaller))
261+ then {
262+ let ensure = match getInteger(poolContract, lastPutOneTknCall(caller)) {
263+ case int: Int =>
264+ let permittedHeight = (int + value(getInteger(poolContract, delay)))
265+ let isReadyforPutOneTkn = (permittedHeight >= height)
266+ let needBlocks = (permittedHeight - height)
267+ if (isReadyforPutOneTkn)
268+ then true
269+ else throw(makeString(["wait for", toString(needBlocks), "block(s) more"], " "))
270+ case _ =>
271+ true
272+ }
273+ let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), height], nil)
274+ if ((setI == setI))
275+ then $Tuple2(nil, ensure)
276+ else throw("Strict value is not equal to itself.")
277+ }
278+ else throw("Strict value is not equal to itself.")
279+ }
280+
281+
222282 @Verifier(tx)
223283 func verify () = {
224284 let targetPublicKey = match managerPublicKeyOrUnit() {
225285 case pk: ByteVector =>
226286 pk
227287 case _: Unit =>
228288 tx.senderPublicKey
229289 case _ =>
230290 throw("Match error")
231291 }
232292 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
233293 }
234294

github/deemru/w8io/169f3d6 
42.43 ms