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