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:AAIFAAAAAAAAACwIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgSAwoBCAAAACEAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAAlpZHhMUEFzSWQAAAAAAAAAAAMAAAAACWlkeEFtQXNJZAAAAAAAAAAABAAAAAAJaWR4UHJBc0lkAAAAAAAAAAAFAAAAAA9pZHhGYWN0U3Rha0NudHIAAAAAAAAAAAEAAAAABWRlbGF5AgAAAAklc19fZGVsYXkBAAAAC2tleUZhY3RDbnRyAAAAAAIAAAATJXNfX2ZhY3RvcnlDb250cmFjdAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAACAAAAGyVzX19wZW5kaW5nTWFuYWdlclB1YmxpY0tleQEAAAALa2V5UG9vbEFkZHIAAAAAAgAAAA8lc19fcG9vbEFkZHJlc3MBAAAAC2tleUFtdEFzc2V0A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AAAAABQAAAA90YXJnZXRQdWJsaWNLZXkF2tq6", "chainId": 84, "height": 2060128, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6hLM1g1dBSXmi7moRH4rp93bBYSKEob1JZ39MZTeBp6Y Next: dJL67ZGyK1KqtQixH5GEzaSwPQymYuMZgbm1rW2zZXe Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let idxPrAsId = 5 | |
15 | 15 | ||
16 | 16 | let idxFactStakCntr = 1 | |
17 | + | ||
18 | + | let delay = "%s__delay" | |
17 | 19 | ||
18 | 20 | func keyFactCntr () = "%s__factoryContract" | |
19 | 21 | ||
40 | 42 | ||
41 | 43 | ||
42 | 44 | 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) | |
43 | 51 | ||
44 | 52 | ||
45 | 53 | func keyFactoryConfig () = "%s__factoryConfig" | |
219 | 227 | } | |
220 | 228 | ||
221 | 229 | ||
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 | + | ||
222 | 282 | @Verifier(tx) | |
223 | 283 | func verify () = { | |
224 | 284 | let targetPublicKey = match managerPublicKeyOrUnit() { |
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 | + | ||
18 | + | let delay = "%s__delay" | |
17 | 19 | ||
18 | 20 | func keyFactCntr () = "%s__factoryContract" | |
19 | 21 | ||
20 | 22 | ||
21 | 23 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
22 | 24 | ||
23 | 25 | ||
24 | 26 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
25 | 27 | ||
26 | 28 | ||
27 | 29 | func keyPoolAddr () = "%s__poolAddress" | |
28 | 30 | ||
29 | 31 | ||
30 | 32 | func keyAmtAsset () = "%s__amountAsset" | |
31 | 33 | ||
32 | 34 | ||
33 | 35 | func keyPriceAsset () = "%s__priceAsset" | |
34 | 36 | ||
35 | 37 | ||
36 | 38 | func keyAdminPubKeys () = "%s__adminPubKeys" | |
37 | 39 | ||
38 | 40 | ||
39 | 41 | func keyAmp () = "%s__amp" | |
40 | 42 | ||
41 | 43 | ||
42 | 44 | 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) | |
43 | 51 | ||
44 | 52 | ||
45 | 53 | func keyFactoryConfig () = "%s__factoryConfig" | |
46 | 54 | ||
47 | 55 | ||
48 | 56 | func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config") | |
49 | 57 | ||
50 | 58 | ||
51 | 59 | func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr) | |
52 | 60 | ||
53 | 61 | ||
54 | 62 | func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
55 | 63 | ||
56 | 64 | ||
57 | 65 | func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
58 | 66 | ||
59 | 67 | ||
60 | 68 | let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr())) | |
61 | 69 | ||
62 | 70 | let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr())) | |
63 | 71 | ||
64 | 72 | func getPoolConfig () = { | |
65 | 73 | let amtAs = getStringOrFail(poolContract, keyAmtAsset()) | |
66 | 74 | let priceAs = getStringOrFail(poolContract, keyPriceAsset()) | |
67 | 75 | let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs)) | |
68 | 76 | let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs)) | |
69 | 77 | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP) | |
70 | 78 | } | |
71 | 79 | ||
72 | 80 | ||
73 | 81 | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
74 | 82 | ||
75 | 83 | ||
76 | 84 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
77 | 85 | case s: String => | |
78 | 86 | fromBase58String(s) | |
79 | 87 | case _: Unit => | |
80 | 88 | unit | |
81 | 89 | case _ => | |
82 | 90 | throw("Match error") | |
83 | 91 | } | |
84 | 92 | ||
85 | 93 | ||
86 | 94 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
87 | 95 | case s: String => | |
88 | 96 | fromBase58String(s) | |
89 | 97 | case _: Unit => | |
90 | 98 | unit | |
91 | 99 | case _ => | |
92 | 100 | throw("Match error") | |
93 | 101 | } | |
94 | 102 | ||
95 | 103 | ||
96 | 104 | func mustManager (i) = { | |
97 | 105 | let pd = throw("Permission denied") | |
98 | 106 | match managerPublicKeyOrUnit() { | |
99 | 107 | case pk: ByteVector => | |
100 | 108 | if ((i.callerPublicKey == pk)) | |
101 | 109 | then true | |
102 | 110 | else pd | |
103 | 111 | case _: Unit => | |
104 | 112 | if ((i.caller == this)) | |
105 | 113 | then true | |
106 | 114 | else pd | |
107 | 115 | case _ => | |
108 | 116 | throw("Match error") | |
109 | 117 | } | |
110 | 118 | } | |
111 | 119 | ||
112 | 120 | ||
113 | 121 | func getAdmins () = match getString(keyAdminPubKeys()) { | |
114 | 122 | case s: String => | |
115 | 123 | if ((size(s) == 0)) | |
116 | 124 | then nil | |
117 | 125 | else split(s, SEP) | |
118 | 126 | case _ => | |
119 | 127 | nil | |
120 | 128 | } | |
121 | 129 | ||
122 | 130 | ||
123 | 131 | func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey))) | |
124 | 132 | then true | |
125 | 133 | else mustManager(i) | |
126 | 134 | ||
127 | 135 | ||
128 | 136 | @Callable(i) | |
129 | 137 | func constructor (poolAddress) = { | |
130 | 138 | let checkCaller = mustManager(i) | |
131 | 139 | if ((checkCaller == checkCaller)) | |
132 | 140 | then [StringEntry(keyPoolAddr(), poolAddress)] | |
133 | 141 | else throw("Strict value is not equal to itself.") | |
134 | 142 | } | |
135 | 143 | ||
136 | 144 | ||
137 | 145 | ||
138 | 146 | @Callable(i) | |
139 | 147 | func setManager (pendingManagerPublicKey) = { | |
140 | 148 | let checkCaller = mustManager(i) | |
141 | 149 | if ((checkCaller == checkCaller)) | |
142 | 150 | then { | |
143 | 151 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
144 | 152 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
145 | 153 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
146 | 154 | else throw("Strict value is not equal to itself.") | |
147 | 155 | } | |
148 | 156 | else throw("Strict value is not equal to itself.") | |
149 | 157 | } | |
150 | 158 | ||
151 | 159 | ||
152 | 160 | ||
153 | 161 | @Callable(i) | |
154 | 162 | func confirmManager () = { | |
155 | 163 | let pm = pendingManagerPublicKeyOrUnit() | |
156 | 164 | let hasPM = if (isDefined(pm)) | |
157 | 165 | then true | |
158 | 166 | else throw("No pending manager") | |
159 | 167 | if ((hasPM == hasPM)) | |
160 | 168 | then { | |
161 | 169 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
162 | 170 | then true | |
163 | 171 | else throw("You are not pending manager") | |
164 | 172 | if ((checkPM == checkPM)) | |
165 | 173 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
166 | 174 | else throw("Strict value is not equal to itself.") | |
167 | 175 | } | |
168 | 176 | else throw("Strict value is not equal to itself.") | |
169 | 177 | } | |
170 | 178 | ||
171 | 179 | ||
172 | 180 | ||
173 | 181 | @Callable(i) | |
174 | 182 | func setAdmins (adminPubKeys) = { | |
175 | 183 | let checkCaller = mustManager(i) | |
176 | 184 | if ((checkCaller == checkCaller)) | |
177 | 185 | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
178 | 186 | else throw("Strict value is not equal to itself.") | |
179 | 187 | } | |
180 | 188 | ||
181 | 189 | ||
182 | 190 | ||
183 | 191 | @Callable(i) | |
184 | 192 | func unstakeAndGetOneTkn (amount,exchResult,notUsed,outAmount,outAssetId,slippage) = { | |
185 | 193 | let checkPayments = if ((size(i.payments) != 0)) | |
186 | 194 | then throw("No pmnts expd") | |
187 | 195 | else true | |
188 | 196 | if ((checkPayments == checkPayments)) | |
189 | 197 | then { | |
190 | 198 | let cfg = getPoolConfig() | |
191 | 199 | let factoryCfg = getFactoryConfig() | |
192 | 200 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
193 | 201 | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
194 | 202 | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil) | |
195 | 203 | if ((unstakeInv == unstakeInv)) | |
196 | 204 | then { | |
197 | 205 | let getOneTkn = invoke(poolContract, "getOneTkn", [exchResult, notUsed, outAmount, outAssetId, slippage], [AttachedPayment(lpAssetId, amount)]) | |
198 | 206 | if ((getOneTkn == getOneTkn)) | |
199 | 207 | then nil | |
200 | 208 | else throw("Strict value is not equal to itself.") | |
201 | 209 | } | |
202 | 210 | else throw("Strict value is not equal to itself.") | |
203 | 211 | } | |
204 | 212 | else throw("Strict value is not equal to itself.") | |
205 | 213 | } | |
206 | 214 | ||
207 | 215 | ||
208 | 216 | ||
209 | 217 | @Callable(i) | |
210 | 218 | func setAmp (amp) = { | |
211 | 219 | let checkCaller = mustAdmin(i) | |
212 | 220 | if ((checkCaller == checkCaller)) | |
213 | 221 | then { | |
214 | 222 | let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil) | |
215 | 223 | let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil) | |
216 | 224 | $Tuple2(nil, $Tuple2(res1, res2)) | |
217 | 225 | } | |
218 | 226 | else throw("Strict value is not equal to itself.") | |
219 | 227 | } | |
220 | 228 | ||
221 | 229 | ||
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 | + | ||
222 | 282 | @Verifier(tx) | |
223 | 283 | func verify () = { | |
224 | 284 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
225 | 285 | case pk: ByteVector => | |
226 | 286 | pk | |
227 | 287 | case _: Unit => | |
228 | 288 | tx.senderPublicKey | |
229 | 289 | case _ => | |
230 | 290 | throw("Match error") | |
231 | 291 | } | |
232 | 292 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
233 | 293 | } | |
234 | 294 |
github/deemru/w8io/169f3d6 42.43 ms ◑