tx · 9MPg21ihVjKQ2HcmzsbcUEZVWz5NefAx4MLixL75bmBv 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV: -0.01400000 Waves 2022.05.30 18:21 [2074556] smart account 3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV > SELF 0.00000000 Waves
{ "type": 13, "id": "9MPg21ihVjKQ2HcmzsbcUEZVWz5NefAx4MLixL75bmBv", "fee": 1400000, "feeAssetId": null, "timestamp": 1653924102996, "version": 1, "sender": "3N8bnD2caKnxdcTqvrJUEkDe3XebgfwWjSV", "senderPublicKey": "8KXPjDuC8ffL9qjNuDBLnkvJKbMojhZYcnm2o75UCyun", "proofs": [ "5GxwGpW7ncKnYjKyGS4sJrqZM8qJTdtnnByrHBjyYteBSchkTkJAy9q7LGCYhFhgysgQ5NeVk7mzQwhxEoQmakS9" ], "script": "base64:AAIFAAAAAAAAACwIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCAAAACIAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAAlpZHhMUEFzSWQAAAAAAAAAAAMAAAAACWlkeEFtQXNJZAAAAAAAAAAABAAAAAAJaWR4UHJBc0lkAAAAAAAAAAAFAAAAAA9pZHhGYWN0U3Rha0NudHIAAAAAAAAAAAEAAAAABWRlbGF5AgAAAAklc19fZGVsYXkBAAAAC2tleUZhY3RDbnRyAAAAAAIAAAATJXNfX2ZhY3RvcnlDb250cmFjdAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAACAAAAGyVzX19wZW5kaW5nTWFuYWdlclB1YmxpY0tleQEAAAALa2V5UG9vbEFkZHIAAAAAAgAAAA8lc19fcG9vbEFkZHJlc3MBAAAAC2tleUFtdEFzc2V0AAAA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BAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXncjX10", "chainId": 84, "height": 2074556, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HLsfhTqaCddi1yMqoYVAxutBRWGacy7YRQb2kjiN8yt8 Next: E5Ka2RuSZjVrDtTtGiLJM3RsZDBKP3zojnuK7bUHpTp3 Diff:
Old | New | Differences | |
---|---|---|---|
241 | 241 | let ensure = match getInteger(poolContract, lastGetOneTknCall(caller)) { | |
242 | 242 | case int: Int => | |
243 | 243 | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
244 | - | let isReadyforGetOneTkn = ( | |
244 | + | let isReadyforGetOneTkn = (height >= permittedHeight) | |
245 | 245 | let needBlocks = (permittedHeight - height) | |
246 | 246 | if (isReadyforGetOneTkn) | |
247 | 247 | then true | |
249 | 249 | case _ => | |
250 | 250 | true | |
251 | 251 | } | |
252 | - | let setI = invoke(poolContract, "setI", [lastGetOneTknCall(caller), height], nil) | |
253 | - | if ((setI == setI)) | |
254 | - | then $Tuple2(nil, ensure) | |
252 | + | if ((ensure == ensure)) | |
253 | + | then { | |
254 | + | let setI = invoke(poolContract, "setI", [lastGetOneTknCall(caller), height], nil) | |
255 | + | if ((setI == setI)) | |
256 | + | then nil | |
257 | + | else throw("Strict value is not equal to itself.") | |
258 | + | } | |
255 | 259 | else throw("Strict value is not equal to itself.") | |
256 | 260 | } | |
257 | 261 | else throw("Strict value is not equal to itself.") | |
267 | 271 | let ensure = match getInteger(poolContract, lastPutOneTknCall(caller)) { | |
268 | 272 | case int: Int => | |
269 | 273 | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
270 | - | let isReadyforPutOneTkn = ( | |
274 | + | let isReadyforPutOneTkn = (height >= permittedHeight) | |
271 | 275 | let needBlocks = (permittedHeight - height) | |
272 | 276 | if (isReadyforPutOneTkn) | |
273 | 277 | then true | |
279 | 283 | then { | |
280 | 284 | let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), height], nil) | |
281 | 285 | if ((setI == setI)) | |
282 | - | then | |
286 | + | then nil | |
283 | 287 | else throw("Strict value is not equal to itself.") | |
284 | 288 | } | |
285 | 289 | 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 | 47 | func lastGetOneTknCall (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func lastPutOneTknCall (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyFactoryConfig () = "%s__factoryConfig" | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config") | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr())) | |
69 | 69 | ||
70 | 70 | let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr())) | |
71 | 71 | ||
72 | 72 | func getPoolConfig () = { | |
73 | 73 | let amtAs = getStringOrFail(poolContract, keyAmtAsset()) | |
74 | 74 | let priceAs = getStringOrFail(poolContract, keyPriceAsset()) | |
75 | 75 | let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs)) | |
76 | 76 | let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs)) | |
77 | 77 | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP) | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
85 | 85 | case s: String => | |
86 | 86 | fromBase58String(s) | |
87 | 87 | case _: Unit => | |
88 | 88 | unit | |
89 | 89 | case _ => | |
90 | 90 | throw("Match error") | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
95 | 95 | case s: String => | |
96 | 96 | fromBase58String(s) | |
97 | 97 | case _: Unit => | |
98 | 98 | unit | |
99 | 99 | case _ => | |
100 | 100 | throw("Match error") | |
101 | 101 | } | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func mustManager (i) = { | |
105 | 105 | let pd = throw("Permission denied addon") | |
106 | 106 | match managerPublicKeyOrUnit() { | |
107 | 107 | case pk: ByteVector => | |
108 | 108 | if ((i.callerPublicKey == pk)) | |
109 | 109 | then true | |
110 | 110 | else pd | |
111 | 111 | case _: Unit => | |
112 | 112 | if ((i.caller == this)) | |
113 | 113 | then true | |
114 | 114 | else pd | |
115 | 115 | case _ => | |
116 | 116 | throw("Match error") | |
117 | 117 | } | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getAdmins () = match getString(keyAdminPubKeys()) { | |
122 | 122 | case s: String => | |
123 | 123 | if ((size(s) == 0)) | |
124 | 124 | then nil | |
125 | 125 | else split(s, SEP) | |
126 | 126 | case _ => | |
127 | 127 | nil | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey))) | |
132 | 132 | then true | |
133 | 133 | else mustManager(i) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func mustPool (i) = if ((i.caller == poolContract)) | |
137 | 137 | then true | |
138 | 138 | else throw("caller must be the pool") | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(i) | |
142 | 142 | func constructor (poolAddress) = { | |
143 | 143 | let checkCaller = mustManager(i) | |
144 | 144 | if ((checkCaller == checkCaller)) | |
145 | 145 | then [StringEntry(keyPoolAddr(), poolAddress)] | |
146 | 146 | else throw("Strict value is not equal to itself.") | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | ||
151 | 151 | @Callable(i) | |
152 | 152 | func setManager (pendingManagerPublicKey) = { | |
153 | 153 | let checkCaller = mustManager(i) | |
154 | 154 | if ((checkCaller == checkCaller)) | |
155 | 155 | then { | |
156 | 156 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
157 | 157 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
158 | 158 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
159 | 159 | else throw("Strict value is not equal to itself.") | |
160 | 160 | } | |
161 | 161 | else throw("Strict value is not equal to itself.") | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | ||
166 | 166 | @Callable(i) | |
167 | 167 | func confirmManager () = { | |
168 | 168 | let pm = pendingManagerPublicKeyOrUnit() | |
169 | 169 | let hasPM = if (isDefined(pm)) | |
170 | 170 | then true | |
171 | 171 | else throw("No pending manager") | |
172 | 172 | if ((hasPM == hasPM)) | |
173 | 173 | then { | |
174 | 174 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
175 | 175 | then true | |
176 | 176 | else throw("You are not pending manager") | |
177 | 177 | if ((checkPM == checkPM)) | |
178 | 178 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
179 | 179 | else throw("Strict value is not equal to itself.") | |
180 | 180 | } | |
181 | 181 | else throw("Strict value is not equal to itself.") | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(i) | |
187 | 187 | func setAdmins (adminPubKeys) = { | |
188 | 188 | let checkCaller = mustManager(i) | |
189 | 189 | if ((checkCaller == checkCaller)) | |
190 | 190 | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
191 | 191 | else throw("Strict value is not equal to itself.") | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | ||
196 | 196 | @Callable(i) | |
197 | 197 | func unstakeAndGetOneTkn (amount,exchResult,notUsed,outAmount,outAssetId,slippage) = { | |
198 | 198 | let checkPayments = if ((size(i.payments) != 0)) | |
199 | 199 | then throw("No pmnts expd") | |
200 | 200 | else true | |
201 | 201 | if ((checkPayments == checkPayments)) | |
202 | 202 | then { | |
203 | 203 | let cfg = getPoolConfig() | |
204 | 204 | let factoryCfg = getFactoryConfig() | |
205 | 205 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
206 | 206 | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
207 | 207 | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil) | |
208 | 208 | if ((unstakeInv == unstakeInv)) | |
209 | 209 | then { | |
210 | 210 | let getOneTkn = invoke(poolContract, "getOneTkn", [exchResult, notUsed, outAmount, outAssetId, slippage], [AttachedPayment(lpAssetId, amount)]) | |
211 | 211 | if ((getOneTkn == getOneTkn)) | |
212 | 212 | then nil | |
213 | 213 | else throw("Strict value is not equal to itself.") | |
214 | 214 | } | |
215 | 215 | else throw("Strict value is not equal to itself.") | |
216 | 216 | } | |
217 | 217 | else throw("Strict value is not equal to itself.") | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(i) | |
223 | 223 | func setAmp (amp) = { | |
224 | 224 | let checkCaller = mustAdmin(i) | |
225 | 225 | if ((checkCaller == checkCaller)) | |
226 | 226 | then { | |
227 | 227 | let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil) | |
228 | 228 | let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil) | |
229 | 229 | $Tuple2(nil, $Tuple2(res1, res2)) | |
230 | 230 | } | |
231 | 231 | else throw("Strict value is not equal to itself.") | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | ||
236 | 236 | @Callable(i) | |
237 | 237 | func ensureCanGetOneTkn (caller) = { | |
238 | 238 | let checkCaller = mustPool(i) | |
239 | 239 | if ((checkCaller == checkCaller)) | |
240 | 240 | then { | |
241 | 241 | let ensure = match getInteger(poolContract, lastGetOneTknCall(caller)) { | |
242 | 242 | case int: Int => | |
243 | 243 | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
244 | - | let isReadyforGetOneTkn = ( | |
244 | + | let isReadyforGetOneTkn = (height >= permittedHeight) | |
245 | 245 | let needBlocks = (permittedHeight - height) | |
246 | 246 | if (isReadyforGetOneTkn) | |
247 | 247 | then true | |
248 | 248 | else throw(makeString(["wait for", toString(needBlocks), "block(s) more"], " ")) | |
249 | 249 | case _ => | |
250 | 250 | true | |
251 | 251 | } | |
252 | - | let setI = invoke(poolContract, "setI", [lastGetOneTknCall(caller), height], nil) | |
253 | - | if ((setI == setI)) | |
254 | - | then $Tuple2(nil, ensure) | |
252 | + | if ((ensure == ensure)) | |
253 | + | then { | |
254 | + | let setI = invoke(poolContract, "setI", [lastGetOneTknCall(caller), height], nil) | |
255 | + | if ((setI == setI)) | |
256 | + | then nil | |
257 | + | else throw("Strict value is not equal to itself.") | |
258 | + | } | |
255 | 259 | else throw("Strict value is not equal to itself.") | |
256 | 260 | } | |
257 | 261 | else throw("Strict value is not equal to itself.") | |
258 | 262 | } | |
259 | 263 | ||
260 | 264 | ||
261 | 265 | ||
262 | 266 | @Callable(i) | |
263 | 267 | func ensureCanPutOneTkn (caller) = { | |
264 | 268 | let checkCaller = mustPool(i) | |
265 | 269 | if ((checkCaller == checkCaller)) | |
266 | 270 | then { | |
267 | 271 | let ensure = match getInteger(poolContract, lastPutOneTknCall(caller)) { | |
268 | 272 | case int: Int => | |
269 | 273 | let permittedHeight = (int + value(getInteger(poolContract, delay))) | |
270 | - | let isReadyforPutOneTkn = ( | |
274 | + | let isReadyforPutOneTkn = (height >= permittedHeight) | |
271 | 275 | let needBlocks = (permittedHeight - height) | |
272 | 276 | if (isReadyforPutOneTkn) | |
273 | 277 | then true | |
274 | 278 | else throw(makeString(["wait for", toString(needBlocks), "block(s) more"], " ")) | |
275 | 279 | case _ => | |
276 | 280 | true | |
277 | 281 | } | |
278 | 282 | if ((ensure == ensure)) | |
279 | 283 | then { | |
280 | 284 | let setI = invoke(poolContract, "setI", [lastPutOneTknCall(caller), height], nil) | |
281 | 285 | if ((setI == setI)) | |
282 | - | then | |
286 | + | then nil | |
283 | 287 | else throw("Strict value is not equal to itself.") | |
284 | 288 | } | |
285 | 289 | else throw("Strict value is not equal to itself.") | |
286 | 290 | } | |
287 | 291 | else throw("Strict value is not equal to itself.") | |
288 | 292 | } | |
289 | 293 | ||
290 | 294 | ||
291 | 295 | @Verifier(tx) | |
292 | 296 | func verify () = { | |
293 | 297 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
294 | 298 | case pk: ByteVector => | |
295 | 299 | pk | |
296 | 300 | case _: Unit => | |
297 | 301 | tx.senderPublicKey | |
298 | 302 | case _ => | |
299 | 303 | throw("Match error") | |
300 | 304 | } | |
301 | 305 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
302 | 306 | } | |
303 | 307 |
github/deemru/w8io/169f3d6 45.23 ms ◑