tx · 5V44Y5meWuqF8XGuckBtNi79qdccqxSNS5GSfkrJ9vdj 3My57GB3ge7XtaAMqc3QMHYmHw5wyxEqWyd: -0.01400000 Waves 2022.06.07 09:20 [2085573] smart account 3My57GB3ge7XtaAMqc3QMHYmHw5wyxEqWyd > SELF 0.00000000 Waves
{ "type": 13, "id": "5V44Y5meWuqF8XGuckBtNi79qdccqxSNS5GSfkrJ9vdj", "fee": 1400000, "feeAssetId": null, "timestamp": 1654582869788, "version": 1, "sender": "3My57GB3ge7XtaAMqc3QMHYmHw5wyxEqWyd", "senderPublicKey": "3n1MmdMKYw8xBhJPebRrNC3DzTdTg5nboqo1d4T2xLTG", "proofs": [ "37dfSchHSnr1kkE6Uj7zJGQxsUDUGGbxeoqy8o83cof5L5WRbjEwNTnwxnsCsbGE4nBjm8CE5TryxBpmNvuX8D2" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgAAAAhAAAAAANTRVACAAAAAl9fAAAAAAVFTVBUWQIAAAAAAAAAAA5pZHhQb29sQWRkcmVzcwAAAAAAAAAAAQAAAAAJaWR4TFBBc0lkAAAAAAAAAAADAAAAAAlpZHhBbUFzSWQAAAAAAAAAAAQAAAAACWlkeFByQXNJZAAAAAAAAAAABQAAAAAPaWR4RmFjdFN0YWtDbnRyAAAAAAAAAAABAAAAAAVkZWxheQIAAAAJJXNfX2RlbGF5AQAAAAtrZXlGYWN0Q250cgAAAAACAAAAEyVzX19mYWN0b3J5Q29udHJhY3QBAAAAE2tleU1hbmFnZXJQdWJsaWNLZXkAAAAAAgAAABQlc19fbWFuYWdlclB1YmxpY0tleQEAAAAaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAAAAAgAAABslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBAAAAC2tleVBvb2xBZGRyAAAAAAIAAAAPJXNfX3Bvb2xBZGRyZXNzAQAAAAtrZXlBbXRBc3NldAAA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ib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5//f6Pw==", "chainId": 84, "height": 2085573, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BhSDvCcL11XC4hWSpPrax8TRYgAT91jWWWKwHb4ayoTb Next: none Diff:
Old | New | Differences | |
---|---|---|---|
44 | 44 | func keyAmpHistory (height) = ("%s%d__amp__" + toString(height)) | |
45 | 45 | ||
46 | 46 | ||
47 | - | func lastGetOneTknCall (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP) | |
48 | - | ||
49 | - | ||
50 | - | func lastPutOneTknCall (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP) | |
47 | + | func lastGetOrPutOneTknCall (caller) = makeString(["%s%s__lastGetOrPutOneTknCall", caller], SEP) | |
51 | 48 | ||
52 | 49 | ||
53 | 50 | func keyFactoryConfig () = "%s__factoryConfig" | |
225 | 222 | if ((checkCaller == checkCaller)) | |
226 | 223 | then { | |
227 | 224 | let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil) | |
228 | - | let res2 = invoke(poolContract, "setS", [keyAmpHistory( | |
225 | + | let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil) | |
229 | 226 | $Tuple2(nil, $Tuple2(res1, res2)) | |
230 | 227 | } | |
231 | 228 | else throw("Strict value is not equal to itself.") | |
234 | 231 | ||
235 | 232 | ||
236 | 233 | @Callable(i) | |
237 | - | func | |
234 | + | func ensureCanGetOrPutOneTkn (caller) = { | |
238 | 235 | let checkCaller = mustPool(i) | |
239 | 236 | if ((checkCaller == checkCaller)) | |
240 | 237 | then { | |
241 | - | let ensureCanPut = match getInteger(poolContract, | |
238 | + | let ensureCanPut = match getInteger(poolContract, lastGetOrPutOneTknCall(caller)) { | |
242 | 239 | case int: Int => | |
243 | 240 | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
244 | - | let isReadyforPutOneTkn = ( | |
245 | - | let needBlocks = (permittedHeight - | |
241 | + | let isReadyforPutOneTkn = (height >= permittedHeight) | |
242 | + | let needBlocks = (permittedHeight - height) | |
246 | 243 | if (isReadyforPutOneTkn) | |
247 | 244 | then true | |
248 | 245 | else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " ")) | |
251 | 248 | } | |
252 | 249 | if ((ensureCanPut == ensureCanPut)) | |
253 | 250 | 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 | - | } | |
251 | + | let setI = invoke(poolContract, "setI", [lastGetOrPutOneTknCall(caller), height], nil) | |
252 | + | if ((setI == setI)) | |
253 | + | then nil | |
317 | 254 | else throw("Strict value is not equal to itself.") | |
318 | 255 | } | |
319 | 256 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let EMPTY = "" | |
7 | 7 | ||
8 | 8 | let idxPoolAddress = 1 | |
9 | 9 | ||
10 | 10 | let idxLPAsId = 3 | |
11 | 11 | ||
12 | 12 | let idxAmAsId = 4 | |
13 | 13 | ||
14 | 14 | let idxPrAsId = 5 | |
15 | 15 | ||
16 | 16 | let idxFactStakCntr = 1 | |
17 | 17 | ||
18 | 18 | let delay = "%s__delay" | |
19 | 19 | ||
20 | 20 | func keyFactCntr () = "%s__factoryContract" | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func keyPoolAddr () = "%s__poolAddress" | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func keyAmtAsset () = "%s__amountAsset" | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func keyPriceAsset () = "%s__priceAsset" | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyAdminPubKeys () = "%s__adminPubKeys" | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func keyAmp () = "%s__amp" | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyAmpHistory (height) = ("%s%d__amp__" + toString(height)) | |
45 | 45 | ||
46 | 46 | ||
47 | - | func lastGetOneTknCall (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP) | |
48 | - | ||
49 | - | ||
50 | - | func lastPutOneTknCall (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP) | |
47 | + | func lastGetOrPutOneTknCall (caller) = makeString(["%s%s__lastGetOrPutOneTknCall", caller], SEP) | |
51 | 48 | ||
52 | 49 | ||
53 | 50 | func keyFactoryConfig () = "%s__factoryConfig" | |
54 | 51 | ||
55 | 52 | ||
56 | 53 | func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config") | |
57 | 54 | ||
58 | 55 | ||
59 | 56 | func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr) | |
60 | 57 | ||
61 | 58 | ||
62 | 59 | func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
63 | 60 | ||
64 | 61 | ||
65 | 62 | func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
66 | 63 | ||
67 | 64 | ||
68 | 65 | let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr())) | |
69 | 66 | ||
70 | 67 | let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr())) | |
71 | 68 | ||
72 | 69 | func getPoolConfig () = { | |
73 | 70 | let amtAs = getStringOrFail(poolContract, keyAmtAsset()) | |
74 | 71 | let priceAs = getStringOrFail(poolContract, keyPriceAsset()) | |
75 | 72 | let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs)) | |
76 | 73 | let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs)) | |
77 | 74 | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP) | |
78 | 75 | } | |
79 | 76 | ||
80 | 77 | ||
81 | 78 | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
82 | 79 | ||
83 | 80 | ||
84 | 81 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
85 | 82 | case s: String => | |
86 | 83 | fromBase58String(s) | |
87 | 84 | case _: Unit => | |
88 | 85 | unit | |
89 | 86 | case _ => | |
90 | 87 | throw("Match error") | |
91 | 88 | } | |
92 | 89 | ||
93 | 90 | ||
94 | 91 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
95 | 92 | case s: String => | |
96 | 93 | fromBase58String(s) | |
97 | 94 | case _: Unit => | |
98 | 95 | unit | |
99 | 96 | case _ => | |
100 | 97 | throw("Match error") | |
101 | 98 | } | |
102 | 99 | ||
103 | 100 | ||
104 | 101 | func mustManager (i) = { | |
105 | 102 | let pd = throw("Permission denied") | |
106 | 103 | match managerPublicKeyOrUnit() { | |
107 | 104 | case pk: ByteVector => | |
108 | 105 | if ((i.callerPublicKey == pk)) | |
109 | 106 | then true | |
110 | 107 | else pd | |
111 | 108 | case _: Unit => | |
112 | 109 | if ((i.caller == this)) | |
113 | 110 | then true | |
114 | 111 | else pd | |
115 | 112 | case _ => | |
116 | 113 | throw("Match error") | |
117 | 114 | } | |
118 | 115 | } | |
119 | 116 | ||
120 | 117 | ||
121 | 118 | func getAdmins () = match getString(keyAdminPubKeys()) { | |
122 | 119 | case s: String => | |
123 | 120 | if ((size(s) == 0)) | |
124 | 121 | then nil | |
125 | 122 | else split(s, SEP) | |
126 | 123 | case _ => | |
127 | 124 | nil | |
128 | 125 | } | |
129 | 126 | ||
130 | 127 | ||
131 | 128 | func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey))) | |
132 | 129 | then true | |
133 | 130 | else mustManager(i) | |
134 | 131 | ||
135 | 132 | ||
136 | 133 | func mustPool (i) = if ((i.caller == poolContract)) | |
137 | 134 | then true | |
138 | 135 | else throw("caller must be the pool") | |
139 | 136 | ||
140 | 137 | ||
141 | 138 | @Callable(i) | |
142 | 139 | func constructor (poolAddress) = { | |
143 | 140 | let checkCaller = mustManager(i) | |
144 | 141 | if ((checkCaller == checkCaller)) | |
145 | 142 | then [StringEntry(keyPoolAddr(), poolAddress)] | |
146 | 143 | else throw("Strict value is not equal to itself.") | |
147 | 144 | } | |
148 | 145 | ||
149 | 146 | ||
150 | 147 | ||
151 | 148 | @Callable(i) | |
152 | 149 | func setManager (pendingManagerPublicKey) = { | |
153 | 150 | let checkCaller = mustManager(i) | |
154 | 151 | if ((checkCaller == checkCaller)) | |
155 | 152 | then { | |
156 | 153 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
157 | 154 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
158 | 155 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
159 | 156 | else throw("Strict value is not equal to itself.") | |
160 | 157 | } | |
161 | 158 | else throw("Strict value is not equal to itself.") | |
162 | 159 | } | |
163 | 160 | ||
164 | 161 | ||
165 | 162 | ||
166 | 163 | @Callable(i) | |
167 | 164 | func confirmManager () = { | |
168 | 165 | let pm = pendingManagerPublicKeyOrUnit() | |
169 | 166 | let hasPM = if (isDefined(pm)) | |
170 | 167 | then true | |
171 | 168 | else throw("No pending manager") | |
172 | 169 | if ((hasPM == hasPM)) | |
173 | 170 | then { | |
174 | 171 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
175 | 172 | then true | |
176 | 173 | else throw("You are not pending manager") | |
177 | 174 | if ((checkPM == checkPM)) | |
178 | 175 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
179 | 176 | else throw("Strict value is not equal to itself.") | |
180 | 177 | } | |
181 | 178 | else throw("Strict value is not equal to itself.") | |
182 | 179 | } | |
183 | 180 | ||
184 | 181 | ||
185 | 182 | ||
186 | 183 | @Callable(i) | |
187 | 184 | func setAdmins (adminPubKeys) = { | |
188 | 185 | let checkCaller = mustManager(i) | |
189 | 186 | if ((checkCaller == checkCaller)) | |
190 | 187 | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
191 | 188 | else throw("Strict value is not equal to itself.") | |
192 | 189 | } | |
193 | 190 | ||
194 | 191 | ||
195 | 192 | ||
196 | 193 | @Callable(i) | |
197 | 194 | func unstakeAndGetOneTkn (amount,exchResult,notUsed,outAmount,outAssetId,slippage) = { | |
198 | 195 | let checkPayments = if ((size(i.payments) != 0)) | |
199 | 196 | then throw("No pmnts expd") | |
200 | 197 | else true | |
201 | 198 | if ((checkPayments == checkPayments)) | |
202 | 199 | then { | |
203 | 200 | let cfg = getPoolConfig() | |
204 | 201 | let factoryCfg = getFactoryConfig() | |
205 | 202 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
206 | 203 | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
207 | 204 | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil) | |
208 | 205 | if ((unstakeInv == unstakeInv)) | |
209 | 206 | then { | |
210 | 207 | let getOneTkn = invoke(poolContract, "getOneTkn", [exchResult, notUsed, outAmount, outAssetId, slippage], [AttachedPayment(lpAssetId, amount)]) | |
211 | 208 | if ((getOneTkn == getOneTkn)) | |
212 | 209 | then nil | |
213 | 210 | else throw("Strict value is not equal to itself.") | |
214 | 211 | } | |
215 | 212 | else throw("Strict value is not equal to itself.") | |
216 | 213 | } | |
217 | 214 | else throw("Strict value is not equal to itself.") | |
218 | 215 | } | |
219 | 216 | ||
220 | 217 | ||
221 | 218 | ||
222 | 219 | @Callable(i) | |
223 | 220 | func setAmp (amp) = { | |
224 | 221 | let checkCaller = mustAdmin(i) | |
225 | 222 | if ((checkCaller == checkCaller)) | |
226 | 223 | then { | |
227 | 224 | let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil) | |
228 | - | let res2 = invoke(poolContract, "setS", [keyAmpHistory( | |
225 | + | let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil) | |
229 | 226 | $Tuple2(nil, $Tuple2(res1, res2)) | |
230 | 227 | } | |
231 | 228 | else throw("Strict value is not equal to itself.") | |
232 | 229 | } | |
233 | 230 | ||
234 | 231 | ||
235 | 232 | ||
236 | 233 | @Callable(i) | |
237 | - | func | |
234 | + | func ensureCanGetOrPutOneTkn (caller) = { | |
238 | 235 | let checkCaller = mustPool(i) | |
239 | 236 | if ((checkCaller == checkCaller)) | |
240 | 237 | then { | |
241 | - | let ensureCanPut = match getInteger(poolContract, | |
238 | + | let ensureCanPut = match getInteger(poolContract, lastGetOrPutOneTknCall(caller)) { | |
242 | 239 | case int: Int => | |
243 | 240 | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
244 | - | let isReadyforPutOneTkn = ( | |
245 | - | let needBlocks = (permittedHeight - | |
241 | + | let isReadyforPutOneTkn = (height >= permittedHeight) | |
242 | + | let needBlocks = (permittedHeight - height) | |
246 | 243 | if (isReadyforPutOneTkn) | |
247 | 244 | then true | |
248 | 245 | else throw(makeString(["you should wait", toString(needBlocks), "blocks more to perform the action"], " ")) | |
249 | 246 | case _ => | |
250 | 247 | true | |
251 | 248 | } | |
252 | 249 | if ((ensureCanPut == ensureCanPut)) | |
253 | 250 | 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 | - | } | |
251 | + | let setI = invoke(poolContract, "setI", [lastGetOrPutOneTknCall(caller), height], nil) | |
252 | + | if ((setI == setI)) | |
253 | + | then nil | |
317 | 254 | else throw("Strict value is not equal to itself.") | |
318 | 255 | } | |
319 | 256 | else throw("Strict value is not equal to itself.") | |
320 | 257 | } | |
321 | 258 | else throw("Strict value is not equal to itself.") | |
322 | 259 | } | |
323 | 260 | ||
324 | 261 | ||
325 | 262 | @Verifier(tx) | |
326 | 263 | func verify () = { | |
327 | 264 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
328 | 265 | case pk: ByteVector => | |
329 | 266 | pk | |
330 | 267 | case _: Unit => | |
331 | 268 | tx.senderPublicKey | |
332 | 269 | case _ => | |
333 | 270 | throw("Match error") | |
334 | 271 | } | |
335 | 272 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
336 | 273 | } | |
337 | 274 |
github/deemru/w8io/169f3d6 62.81 ms ◑