tx · CXxydS2qDgd9Z24Wc53E2YMQHKWz6dnqWCzU7X9yr9J2 3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV: -0.02900000 Waves 2023.05.12 10:06 [2574391] smart account 3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV > SELF 0.00000000 Waves
{ "type": 13, "id": "CXxydS2qDgd9Z24Wc53E2YMQHKWz6dnqWCzU7X9yr9J2", "fee": 2900000, "feeAssetId": null, "timestamp": 1683875249791, "version": 2, "chainId": 84, "sender": "3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV", "senderPublicKey": "F4oaTkX67vt2MEsXLJJ8a7gaURGjW7x8fkvGfdEiH5oy", "proofs": [ "5gMoJCwS8Rnh4EERyJMaVkYhhEy4yYs8i8RBXboP48B62NFv8gbPETSixQkEW6zZS6BQeurBBB54eLj6c5DVjWf4" ], "script": "base64:BgIsCAISBAoCAgESBAoCAgESBwoFCAgICAgSABIECgIICBIAEgQKAggIEgMKAQhBAAlzZXBhcmF0b3ICAl9fABJzaGFyZUFzc2V0RGVjaW1hbHMACAALd2F2ZXNTdHJpbmcCBVdBVkVTAAdzY2FsZTE4AICAkLu61q3wDQANc2NhbGUxOEJpZ0ludAkAtgIBBQdzY2FsZTE4AQd3cmFwRXJyAQNtc2cJALkJAgkAzAgCAhZscF9zdGFraW5nX3Bvb2xzLnJpZGU6CQDMCAIFA21zZwUDbmlsAgEgAQh0aHJvd0VycgEDbXNnCQACAQkBB3dyYXBFcnIBBQNtc2cBEmVycktleUlzTm90RGVmaW5lZAIHYWRkcmVzcwNrZXkJAQd3cmFwRXJyAQkAuQkCCQDMCAICCm1hbmRhdG9yeSAJAMwIAgkApQgBBQdhZGRyZXNzCQDMCAICAS4JAMwIAgUDa2V5CQDMCAICDyBpcyBub3QgZGVmaW5lZAUDbmlsAgABDGdldFN0ck9yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZ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J0DAQUJbGFzdFByaWNlCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5gLhUNg==", "height": 2574391, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EnuRAfmbkpQis4qRRLEvD8NgGJJso2JoB9EH2cfsfBVM Next: none Diff:
Old | New | Differences | |
---|---|---|---|
122 | 122 | func keyPriceGetHistory (baseAssetId) = makeString(["%s%s%s%s%d%d", assetIdToString(baseAssetId), "price", "history", "get", toString(lastBlock.height), toString(lastBlock.timestamp)], separator) | |
123 | 123 | ||
124 | 124 | ||
125 | - | func keyHistoryEntry (baseAssetId,operation,period,userAddress,txId) = makeString(["%s%s%s%s", "history", | |
125 | + | func keyHistoryEntry (baseAssetId,operation,period,userAddress,txId) = makeString(["%s%s%s%s", "history", toBase58String(value(baseAssetId)), operation, toString(userAddress), toBase58String(txId), toString(height)], separator) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
313 | 313 | else throwErr("invalid asset")] | |
314 | 314 | if ((checks == checks)) | |
315 | 315 | then { | |
316 | - | let $ | |
317 | - | let poolAddress = $ | |
318 | - | let lpAssetId = $ | |
316 | + | let $t01112911232 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
317 | + | let poolAddress = $t01112911232._1 | |
318 | + | let lpAssetId = $t01112911232._2 | |
319 | 319 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
320 | 320 | let userBaseAssetAmountToConvertPeriodOption = getInteger(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
321 | 321 | let claimShareAssetInvocation = if ((userBaseAssetAmountToConvertPeriodOption == unit)) | |
405 | 405 | if ((baseAssetId == baseAssetId)) | |
406 | 406 | then { | |
407 | 407 | let userAddress = i.caller | |
408 | - | let $ | |
409 | - | let poolAddress = $ | |
410 | - | let lpAssetId = $ | |
408 | + | let $t01564215831 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
409 | + | let poolAddress = $t01564215831._1 | |
410 | + | let lpAssetId = $t01564215831._2 | |
411 | 411 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
412 | 412 | let userShareAssetAmountToConvertPeriodOption = getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
413 | 413 | let claimBaseAssetInvocation = if ((userShareAssetAmountToConvertPeriodOption == unit)) | |
504 | 504 | } | |
505 | 505 | if ((checkDelay == checkDelay)) | |
506 | 506 | then { | |
507 | - | let $ | |
508 | - | let poolAddress = $ | |
509 | - | let lpAssetId = $ | |
507 | + | let $t02127221453 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
508 | + | let poolAddress = $t02127221453._1 | |
509 | + | let lpAssetId = $t02127221453._2 | |
510 | 510 | let stakingReward = valueOrErrorMessage({ | |
511 | 511 | let @ = invoke(stakingContract, "claimWxDoNotThrow", [assetIdToString(lpAssetId)], nil) | |
512 | 512 | if ($isInstanceOf(@, "Int")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let shareAssetDecimals = 8 | |
7 | 7 | ||
8 | 8 | let wavesString = "WAVES" | |
9 | 9 | ||
10 | 10 | let scale18 = 1000000000000000000 | |
11 | 11 | ||
12 | 12 | let scale18BigInt = toBigInt(scale18) | |
13 | 13 | ||
14 | 14 | func wrapErr (msg) = makeString(["lp_staking_pools.ride:", msg], " ") | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func throwErr (msg) = throw(wrapErr(msg)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func errKeyIsNotDefined (address,key) = wrapErr(makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func getStrOrFail (address,key) = valueOrErrorMessage(getString(address, key), errKeyIsNotDefined(address, key)) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), errKeyIsNotDefined(address, key)) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func parseAssetId (input) = if ((input == wavesString)) | |
30 | 30 | then unit | |
31 | 31 | else fromBase58String(input) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func assetIdToString (input) = if ((input == unit)) | |
35 | 35 | then wavesString | |
36 | 36 | else toBase58String(value(input)) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func ensurePositive (v) = if ((v >= 0)) | |
40 | 40 | then v | |
41 | 41 | else throwErr("value should be positive") | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyFactoryContract () = makeString(["%s", "factoryContract"], separator) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyLpStakingContract () = makeString(["%s", "lpStakingContract"], separator) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyStakingContract () = makeString(["%s", "stakingContract"], separator) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyBoostingContract () = makeString(["%s", "boostingContract"], separator) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func keySwapContract () = makeString(["%s", "swapContract"], separator) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], separator) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func keyUsdtAssetId () = makeString(["%s", "usdtAssetId"], separator) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func keyWxAssetId () = makeString(["%s", "wxAssetId"], separator) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func keyShutdown () = makeString(["%s", "shutdown"], separator) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func keyMinDelay () = makeString(["%s", "minDelay"], separator) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func keyLockFraction () = makeString(["%s", "lockFraction"], separator) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func keyShareAssetId (baseAssetId) = makeString(["%s%s", assetIdToString(baseAssetId), "shareAssetId"], separator) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func keyBaseAssetId (shareAssetId) = makeString(["%s%s", assetIdToString(shareAssetId), "baseAssetId"], separator) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func keyPeriod (baseAssetId) = makeString(["%s%s", assetIdToString(baseAssetId), "period"], separator) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func keyPeriodStartHeight (baseAssetId,period) = makeString(["%s%s%d", assetIdToString(baseAssetId), "periodStartHeight", toString(period)], separator) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func keyBaseAssetAmountToConvert (baseAssetId) = makeString(["%s%s", assetIdToString(baseAssetId), "baseAssetAmountToConvert"], separator) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyShareAssetAmountToConvert (baseAssetId) = makeString(["%s%s", assetIdToString(baseAssetId), "shareAssetAmountToConvert"], separator) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyUserBaseAssetAmountToConvert (baseAssetId,userAddress) = makeString(["%s%s%s", assetIdToString(baseAssetId), toString(userAddress), "baseAssetAmountToConvert"], separator) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyUserBaseAssetAmountToConvertPeriod (baseAssetId,userAddress) = makeString(["%s%s%s%s", assetIdToString(baseAssetId), toString(userAddress), "baseAssetAmountToConvert", "period"], separator) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyUserShareAssetAmountToConvert (baseAssetId,userAddress) = makeString(["%s%s%s", assetIdToString(baseAssetId), toString(userAddress), "shareAssetAmountToConvert"], separator) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyUserShareAssetAmountToConvertPeriod (baseAssetId,userAddress) = makeString(["%s%s%s%s", assetIdToString(baseAssetId), toString(userAddress), "shareAssetAmountToConvert", "period"], separator) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func keyPricePeriod (baseAssetId,period) = makeString(["%s%s%d", assetIdToString(baseAssetId), "price", toString(period)], separator) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyPriceHistory (baseAssetId) = makeString(["%s%s%s%d%d", assetIdToString(baseAssetId), "price", "history", toString(lastBlock.height), toString(lastBlock.timestamp)], separator) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyPricePeriodPut (baseAssetId,period) = makeString(["%s%s%d%s", assetIdToString(baseAssetId), "price", toString(period), "put"], separator) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyPricePutHistory (baseAssetId) = makeString(["%s%s%s%s%d%d", assetIdToString(baseAssetId), "price", "history", "put", toString(lastBlock.height), toString(lastBlock.timestamp)], separator) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyPricePeriodGet (baseAssetId,period) = makeString(["%s%s%d%s", assetIdToString(baseAssetId), "price", toString(period), "get"], separator) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyPriceGetHistory (baseAssetId) = makeString(["%s%s%s%s%d%d", assetIdToString(baseAssetId), "price", "history", "get", toString(lastBlock.height), toString(lastBlock.timestamp)], separator) | |
123 | 123 | ||
124 | 124 | ||
125 | - | func keyHistoryEntry (baseAssetId,operation,period,userAddress,txId) = makeString(["%s%s%s%s", "history", | |
125 | + | func keyHistoryEntry (baseAssetId,operation,period,userAddress,txId) = makeString(["%s%s%s%s", "history", toBase58String(value(baseAssetId)), operation, toString(userAddress), toBase58String(txId), toString(height)], separator) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
135 | 135 | case s: String => | |
136 | 136 | addressFromStringValue(s) | |
137 | 137 | case _ => | |
138 | 138 | this | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func managerPublicKeyOrUnit () = { | |
143 | 143 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
144 | 144 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
145 | 145 | case s: String => | |
146 | 146 | fromBase58String(s) | |
147 | 147 | case _: Unit => | |
148 | 148 | unit | |
149 | 149 | case _ => | |
150 | 150 | throw("Match error") | |
151 | 151 | } | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | let permissionDeniedError = throw("Permission denied") | |
156 | 156 | ||
157 | 157 | func mustThis (i) = if ((i.caller == this)) | |
158 | 158 | then true | |
159 | 159 | else permissionDeniedError | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
163 | 163 | case pk: ByteVector => | |
164 | 164 | if ((i.callerPublicKey == pk)) | |
165 | 165 | then true | |
166 | 166 | else permissionDeniedError | |
167 | 167 | case _: Unit => | |
168 | 168 | mustThis(i) | |
169 | 169 | case _ => | |
170 | 170 | throw("Match error") | |
171 | 171 | } | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | let shutdown = valueOrElse(getBoolean(keyShutdown()), false) | |
175 | 175 | ||
176 | 176 | func shutdownCheck (i) = if (if (!(shutdown)) | |
177 | 177 | then true | |
178 | 178 | else mustManager(i)) | |
179 | 179 | then true | |
180 | 180 | else throw("operation is disabled") | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract())) | |
184 | 184 | ||
185 | 185 | let lpStakingContract = addressFromStringValue(getStrOrFail(this, keyLpStakingContract())) | |
186 | 186 | ||
187 | 187 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract())) | |
188 | 188 | ||
189 | 189 | let boostingContract = addressFromStringValue(getStrOrFail(this, keyBoostingContract())) | |
190 | 190 | ||
191 | 191 | let swapContract = addressFromStringValue(getStrOrFail(this, keySwapContract())) | |
192 | 192 | ||
193 | 193 | let assetsStoreContract = addressFromStringValue(getStrOrFail(this, keyAssetsStoreContract())) | |
194 | 194 | ||
195 | 195 | let usdtAssetId = parseAssetId(getStrOrFail(this, keyUsdtAssetId())) | |
196 | 196 | ||
197 | 197 | let wxAssetId = parseAssetId(getStrOrFail(this, keyWxAssetId())) | |
198 | 198 | ||
199 | 199 | let minDelayDefault = 1440 | |
200 | 200 | ||
201 | 201 | let minDelay = valueOrElse(getInteger(this, keyMinDelay()), minDelayDefault) | |
202 | 202 | ||
203 | 203 | let lockFractionMultiplier = 100000000 | |
204 | 204 | ||
205 | 205 | let lockFractionDefault = fraction(1, lockFractionMultiplier, 2) | |
206 | 206 | ||
207 | 207 | let lockFraction = valueOrElse(getInteger(this, keyLockFraction()), lockFractionDefault) | |
208 | 208 | ||
209 | 209 | func getPoolInfo (amountAssetId) = { | |
210 | 210 | let amountAssetIdStr = assetIdToString(amountAssetId) | |
211 | 211 | let priceAssetIdStr = assetIdToString(usdtAssetId) | |
212 | 212 | let poolInfoOption = { | |
213 | 213 | let @ = invoke(factoryContract, "poolInfoREADONLY", [amountAssetIdStr, priceAssetIdStr], nil) | |
214 | 214 | if ($isInstanceOf(@, "(Address, ByteVector)")) | |
215 | 215 | then @ | |
216 | 216 | else unit | |
217 | 217 | } | |
218 | 218 | poolInfoOption | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func calcPrice (lpAssetId,shareAssetId) = { | |
223 | 223 | let shareAssetInfo = valueOrErrorMessage(assetInfo(shareAssetId), "failed to get share asset info") | |
224 | 224 | let shareAssetEmission = shareAssetInfo.quantity | |
225 | 225 | let stakedAmount = ensurePositive(valueOrErrorMessage({ | |
226 | 226 | let @ = invoke(stakingContract, "stakedByUserREADONLY", [assetIdToString(lpAssetId), toString(this)], nil) | |
227 | 227 | if ($isInstanceOf(@, "Int")) | |
228 | 228 | then @ | |
229 | 229 | else unit | |
230 | 230 | }, wrapErr("invalid stakedByUserREADONLY result"))) | |
231 | 231 | let price = if ((shareAssetEmission == 0)) | |
232 | 232 | then scale18BigInt | |
233 | 233 | else fraction(toBigInt(stakedAmount), scale18BigInt, toBigInt(shareAssetEmission), FLOOR) | |
234 | 234 | price | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | @Callable(i) | |
239 | 239 | func emit (assetId,amount) = { | |
240 | 240 | let checkCaller = mustThis(i) | |
241 | 241 | if ((checkCaller == checkCaller)) | |
242 | 242 | then { | |
243 | 243 | let isReissuable = true | |
244 | 244 | $Tuple2([Reissue(assetId, amount, isReissuable)], amount) | |
245 | 245 | } | |
246 | 246 | else throw("Strict value is not equal to itself.") | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | ||
251 | 251 | @Callable(i) | |
252 | 252 | func burn (assetId,amount) = { | |
253 | 253 | let checkCaller = mustThis(i) | |
254 | 254 | if ((checkCaller == checkCaller)) | |
255 | 255 | then $Tuple2([Burn(assetId, amount)], amount) | |
256 | 256 | else throw("Strict value is not equal to itself.") | |
257 | 257 | } | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | ||
261 | 261 | @Callable(i) | |
262 | 262 | func create (baseAssetIdStr,shareAssetIdStr,shareAssetName,shareAssetDescription,shareAssetLogo) = { | |
263 | 263 | let shareAssetLabel = "STAKING_LP" | |
264 | 264 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
265 | 265 | let checks = [mustManager(i), if (isDefined(getPoolInfo(baseAssetId))) | |
266 | 266 | then true | |
267 | 267 | else throwErr("invalid base asset")] | |
268 | 268 | if ((checks == checks)) | |
269 | 269 | then { | |
270 | 270 | let commonState = [IntegerEntry(keyPeriod(baseAssetId), 0)] | |
271 | 271 | if ((shareAssetIdStr == "")) | |
272 | 272 | then { | |
273 | 273 | let shareAssetIssueAmount = 1 | |
274 | 274 | let shareAssetIssueAction = Issue(shareAssetName, shareAssetDescription, shareAssetIssueAmount, shareAssetDecimals, true) | |
275 | 275 | let calculatedShareAssetId = calculateAssetId(shareAssetIssueAction) | |
276 | 276 | let shareAssetBurnAction = Burn(calculatedShareAssetId, shareAssetIssueAmount) | |
277 | 277 | let calculatedShareAssetIdStr = toBase58String(calculatedShareAssetId) | |
278 | 278 | let createOrUpdate = invoke(assetsStoreContract, "createOrUpdate", [calculatedShareAssetIdStr, shareAssetLogo, false], nil) | |
279 | 279 | if ((createOrUpdate == createOrUpdate)) | |
280 | 280 | then { | |
281 | 281 | let addLabel = invoke(assetsStoreContract, "addLabel", [calculatedShareAssetIdStr, shareAssetLabel], nil) | |
282 | 282 | if ((addLabel == addLabel)) | |
283 | 283 | then $Tuple2((commonState ++ [shareAssetIssueAction, shareAssetBurnAction, StringEntry(keyShareAssetId(baseAssetId), calculatedShareAssetIdStr), StringEntry(keyBaseAssetId(calculatedShareAssetId), baseAssetIdStr)]), calculatedShareAssetIdStr) | |
284 | 284 | else throw("Strict value is not equal to itself.") | |
285 | 285 | } | |
286 | 286 | else throw("Strict value is not equal to itself.") | |
287 | 287 | } | |
288 | 288 | else { | |
289 | 289 | let shareAssetId = fromBase58String(shareAssetIdStr) | |
290 | 290 | let shareAssetInfo = valueOrErrorMessage(assetInfo(shareAssetId), wrapErr("invalid share asset id")) | |
291 | 291 | let checkIssuer = if ((shareAssetInfo.issuer == lpStakingContract)) | |
292 | 292 | then true | |
293 | 293 | else throwErr("invalid share asset id issuer") | |
294 | 294 | if ((checkIssuer == checkIssuer)) | |
295 | 295 | then $Tuple2((commonState ++ [StringEntry(keyShareAssetId(baseAssetId), shareAssetIdStr), StringEntry(keyBaseAssetId(shareAssetId), baseAssetIdStr)]), shareAssetIdStr) | |
296 | 296 | else throw("Strict value is not equal to itself.") | |
297 | 297 | } | |
298 | 298 | } | |
299 | 299 | else throw("Strict value is not equal to itself.") | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | ||
304 | 304 | @Callable(i) | |
305 | 305 | func put () = { | |
306 | 306 | let pmt = if ((size(i.payments) == 1)) | |
307 | 307 | then i.payments[0] | |
308 | 308 | else throwErr("exactly 1 payment is expected") | |
309 | 309 | let baseAssetId = pmt.assetId | |
310 | 310 | let userAddress = i.caller | |
311 | 311 | let checks = [shutdownCheck(i), if (isDefined(getString(keyShareAssetId(baseAssetId)))) | |
312 | 312 | then true | |
313 | 313 | else throwErr("invalid asset")] | |
314 | 314 | if ((checks == checks)) | |
315 | 315 | then { | |
316 | - | let $ | |
317 | - | let poolAddress = $ | |
318 | - | let lpAssetId = $ | |
316 | + | let $t01112911232 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
317 | + | let poolAddress = $t01112911232._1 | |
318 | + | let lpAssetId = $t01112911232._2 | |
319 | 319 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
320 | 320 | let userBaseAssetAmountToConvertPeriodOption = getInteger(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
321 | 321 | let claimShareAssetInvocation = if ((userBaseAssetAmountToConvertPeriodOption == unit)) | |
322 | 322 | then unit | |
323 | 323 | else { | |
324 | 324 | let userBaseAssetAmountToConvertPeriod = value(userBaseAssetAmountToConvertPeriodOption) | |
325 | 325 | if ((userBaseAssetAmountToConvertPeriod == period)) | |
326 | 326 | then unit | |
327 | 327 | else invoke(this, "claimShareAsset", [assetIdToString(baseAssetId), toString(userAddress)], nil) | |
328 | 328 | } | |
329 | 329 | if ((claimShareAssetInvocation == claimShareAssetInvocation)) | |
330 | 330 | then { | |
331 | 331 | let baseAssetAmountToConvert = valueOrElse(getInteger(keyBaseAssetAmountToConvert(baseAssetId)), 0) | |
332 | 332 | let userBaseAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
333 | 333 | $Tuple2([IntegerEntry(keyBaseAssetAmountToConvert(baseAssetId), (baseAssetAmountToConvert + pmt.amount)), StringEntry(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress), makeString(["%d%d%d", toString((userBaseAssetAmountToConvert + pmt.amount)), toString(lastBlock.timestamp), toString(period)], separator)), IntegerEntry(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress), period), StringEntry(keyHistoryEntry(baseAssetId, "put", period, userAddress, i.transactionId), makeString(["%d%d%d", toString(pmt.amount), toString(lastBlock.timestamp), toString(userBaseAssetAmountToConvert)], separator))], unit) | |
334 | 334 | } | |
335 | 335 | else throw("Strict value is not equal to itself.") | |
336 | 336 | } | |
337 | 337 | else throw("Strict value is not equal to itself.") | |
338 | 338 | } | |
339 | 339 | ||
340 | 340 | ||
341 | 341 | ||
342 | 342 | @Callable(i) | |
343 | 343 | func claimShareAsset (baseAssetIdStr,userAddressStr) = { | |
344 | 344 | let checks = [shutdownCheck(i)] | |
345 | 345 | if ((checks == checks)) | |
346 | 346 | then { | |
347 | 347 | let userAddress = if ((userAddressStr == "")) | |
348 | 348 | then i.caller | |
349 | 349 | else { | |
350 | 350 | let checkCaller = mustThis(i) | |
351 | 351 | if ((checkCaller == checkCaller)) | |
352 | 352 | then valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address")) | |
353 | 353 | else throw("Strict value is not equal to itself.") | |
354 | 354 | } | |
355 | 355 | if ((userAddress == userAddress)) | |
356 | 356 | then { | |
357 | 357 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
358 | 358 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
359 | 359 | if ((shareAssetId == shareAssetId)) | |
360 | 360 | then { | |
361 | 361 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
362 | 362 | if ((period == period)) | |
363 | 363 | then { | |
364 | 364 | let userBaseAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
365 | 365 | let checkAmountToConvert = if ((userBaseAssetAmountToConvert > 0)) | |
366 | 366 | then true | |
367 | 367 | else throwErr("nothing to claim") | |
368 | 368 | if ((checkAmountToConvert == checkAmountToConvert)) | |
369 | 369 | then { | |
370 | 370 | let userBaseAssetAmountToConvertPeriod = valueOrErrorMessage(getInteger(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress)), wrapErr("failed to get period")) | |
371 | 371 | let checkPeriod = if ((period > userBaseAssetAmountToConvertPeriod)) | |
372 | 372 | then true | |
373 | 373 | else throwErr("invalid period") | |
374 | 374 | if ((checkPeriod == checkPeriod)) | |
375 | 375 | then { | |
376 | 376 | let price = toBigInt(valueOrErrorMessage(getBinary(keyPricePeriodPut(baseAssetId, userBaseAssetAmountToConvertPeriod)), wrapErr("failed to get price"))) | |
377 | 377 | let shareAssetAmount = toInt(fraction(toBigInt(userBaseAssetAmountToConvert), scale18BigInt, price)) | |
378 | 378 | $Tuple2([StringEntry(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress), makeString(["%d%d%d", toString(0), toString(lastBlock.timestamp), toString(period)], separator)), DeleteEntry(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress)), ScriptTransfer(userAddress, shareAssetAmount, shareAssetId), StringEntry(keyHistoryEntry(baseAssetId, "claimShareAsset", period, userAddress, i.transactionId), makeString(["%d%d%d%d", toString(shareAssetAmount), toString(lastBlock.timestamp), toString(price), toString(userBaseAssetAmountToConvert)], separator))], unit) | |
379 | 379 | } | |
380 | 380 | else throw("Strict value is not equal to itself.") | |
381 | 381 | } | |
382 | 382 | else throw("Strict value is not equal to itself.") | |
383 | 383 | } | |
384 | 384 | else throw("Strict value is not equal to itself.") | |
385 | 385 | } | |
386 | 386 | else throw("Strict value is not equal to itself.") | |
387 | 387 | } | |
388 | 388 | else throw("Strict value is not equal to itself.") | |
389 | 389 | } | |
390 | 390 | else throw("Strict value is not equal to itself.") | |
391 | 391 | } | |
392 | 392 | ||
393 | 393 | ||
394 | 394 | ||
395 | 395 | @Callable(i) | |
396 | 396 | func get () = { | |
397 | 397 | let checks = [shutdownCheck(i)] | |
398 | 398 | if ((checks == checks)) | |
399 | 399 | then { | |
400 | 400 | let pmt = if ((size(i.payments) == 1)) | |
401 | 401 | then i.payments[0] | |
402 | 402 | else throwErr("exactly 1 payment is expected") | |
403 | 403 | let shareAssetId = pmt.assetId | |
404 | 404 | let baseAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyBaseAssetId(shareAssetId)), wrapErr("invalid share asset id")))) | |
405 | 405 | if ((baseAssetId == baseAssetId)) | |
406 | 406 | then { | |
407 | 407 | let userAddress = i.caller | |
408 | - | let $ | |
409 | - | let poolAddress = $ | |
410 | - | let lpAssetId = $ | |
408 | + | let $t01564215831 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
409 | + | let poolAddress = $t01564215831._1 | |
410 | + | let lpAssetId = $t01564215831._2 | |
411 | 411 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
412 | 412 | let userShareAssetAmountToConvertPeriodOption = getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
413 | 413 | let claimBaseAssetInvocation = if ((userShareAssetAmountToConvertPeriodOption == unit)) | |
414 | 414 | then unit | |
415 | 415 | else { | |
416 | 416 | let userShareAssetAmountToConvertPeriod = value(userShareAssetAmountToConvertPeriodOption) | |
417 | 417 | if ((userShareAssetAmountToConvertPeriod == period)) | |
418 | 418 | then unit | |
419 | 419 | else invoke(this, "claimBaseAsset", [assetIdToString(baseAssetId), toString(userAddress)], nil) | |
420 | 420 | } | |
421 | 421 | if ((claimBaseAssetInvocation == claimBaseAssetInvocation)) | |
422 | 422 | then { | |
423 | 423 | let shareAssetAmountToConvert = valueOrElse(getInteger(keyShareAssetAmountToConvert(baseAssetId)), 0) | |
424 | 424 | let userShareAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserShareAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
425 | 425 | $Tuple2([IntegerEntry(keyShareAssetAmountToConvert(baseAssetId), (shareAssetAmountToConvert + pmt.amount)), StringEntry(keyUserShareAssetAmountToConvert(baseAssetId, userAddress), makeString(["%d%d%d", toString((userShareAssetAmountToConvert + pmt.amount)), toString(lastBlock.timestamp), toString(period)], separator)), IntegerEntry(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress), period), StringEntry(keyHistoryEntry(baseAssetId, "get", period, userAddress, i.transactionId), makeString(["%d%d%d", toString(pmt.amount), toString(lastBlock.timestamp), toString(userShareAssetAmountToConvert)], separator))], unit) | |
426 | 426 | } | |
427 | 427 | else throw("Strict value is not equal to itself.") | |
428 | 428 | } | |
429 | 429 | else throw("Strict value is not equal to itself.") | |
430 | 430 | } | |
431 | 431 | else throw("Strict value is not equal to itself.") | |
432 | 432 | } | |
433 | 433 | ||
434 | 434 | ||
435 | 435 | ||
436 | 436 | @Callable(i) | |
437 | 437 | func claimBaseAsset (baseAssetIdStr,userAddressStr) = { | |
438 | 438 | let checks = [shutdownCheck(i)] | |
439 | 439 | if ((checks == checks)) | |
440 | 440 | then { | |
441 | 441 | let userAddress = if ((userAddressStr == "")) | |
442 | 442 | then i.caller | |
443 | 443 | else { | |
444 | 444 | let checkCaller = mustThis(i) | |
445 | 445 | if ((checkCaller == checkCaller)) | |
446 | 446 | then valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address")) | |
447 | 447 | else throw("Strict value is not equal to itself.") | |
448 | 448 | } | |
449 | 449 | if ((userAddress == userAddress)) | |
450 | 450 | then { | |
451 | 451 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
452 | 452 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
453 | 453 | if ((shareAssetId == shareAssetId)) | |
454 | 454 | then { | |
455 | 455 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
456 | 456 | if ((period == period)) | |
457 | 457 | then { | |
458 | 458 | let userShareAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserShareAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
459 | 459 | let userShareAssetAmountToConvertPeriod = valueOrErrorMessage(getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)), wrapErr("failed to get period")) | |
460 | 460 | let checkPeriod = if ((period > userShareAssetAmountToConvertPeriod)) | |
461 | 461 | then true | |
462 | 462 | else throwErr("invalid period") | |
463 | 463 | if ((checkPeriod == checkPeriod)) | |
464 | 464 | then { | |
465 | 465 | let price = toBigInt(valueOrErrorMessage(getBinary(keyPricePeriodGet(baseAssetId, userShareAssetAmountToConvertPeriod)), wrapErr("failed to get price"))) | |
466 | 466 | let baseAssetAmount = toInt(fraction(toBigInt(userShareAssetAmountToConvert), price, scale18BigInt)) | |
467 | 467 | $Tuple2([StringEntry(keyUserShareAssetAmountToConvert(baseAssetId, userAddress), makeString(["%d%d%d", toString(0), toString(lastBlock.timestamp), toString(period)], separator)), DeleteEntry(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)), ScriptTransfer(userAddress, baseAssetAmount, baseAssetId), StringEntry(keyHistoryEntry(baseAssetId, "claimBaseAsset", period, userAddress, i.transactionId), makeString(["%d%d%d%d", toString(baseAssetAmount), toString(lastBlock.timestamp), toString(price), toString(userShareAssetAmountToConvertPeriod)], separator))], unit) | |
468 | 468 | } | |
469 | 469 | else throw("Strict value is not equal to itself.") | |
470 | 470 | } | |
471 | 471 | else throw("Strict value is not equal to itself.") | |
472 | 472 | } | |
473 | 473 | else throw("Strict value is not equal to itself.") | |
474 | 474 | } | |
475 | 475 | else throw("Strict value is not equal to itself.") | |
476 | 476 | } | |
477 | 477 | else throw("Strict value is not equal to itself.") | |
478 | 478 | } | |
479 | 479 | ||
480 | 480 | ||
481 | 481 | ||
482 | 482 | @Callable(i) | |
483 | 483 | func finalize (baseAssetIdStr) = { | |
484 | 484 | let checks = [shutdownCheck(i)] | |
485 | 485 | if ((checks == checks)) | |
486 | 486 | then { | |
487 | 487 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
488 | 488 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
489 | 489 | if ((shareAssetId == shareAssetId)) | |
490 | 490 | then { | |
491 | 491 | let shareAssetInfo = valueOrErrorMessage(assetInfo(shareAssetId), wrapErr("invalid share asset id")) | |
492 | 492 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
493 | 493 | if ((period == period)) | |
494 | 494 | then { | |
495 | 495 | let periodStartHeightOption = getInteger(keyPeriodStartHeight(baseAssetId, period)) | |
496 | 496 | let checkDelay = if ((periodStartHeightOption == unit)) | |
497 | 497 | then unit | |
498 | 498 | else { | |
499 | 499 | let delay = (height - value(periodStartHeightOption)) | |
500 | 500 | let blocksToWait = max([0, (minDelay - delay)]) | |
501 | 501 | if ((blocksToWait == 0)) | |
502 | 502 | then unit | |
503 | 503 | else throwErr(makeString(["finalization will be possible in ", toString(blocksToWait), " blocks"], "")) | |
504 | 504 | } | |
505 | 505 | if ((checkDelay == checkDelay)) | |
506 | 506 | then { | |
507 | - | let $ | |
508 | - | let poolAddress = $ | |
509 | - | let lpAssetId = $ | |
507 | + | let $t02127221453 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
508 | + | let poolAddress = $t02127221453._1 | |
509 | + | let lpAssetId = $t02127221453._2 | |
510 | 510 | let stakingReward = valueOrErrorMessage({ | |
511 | 511 | let @ = invoke(stakingContract, "claimWxDoNotThrow", [assetIdToString(lpAssetId)], nil) | |
512 | 512 | if ($isInstanceOf(@, "Int")) | |
513 | 513 | then @ | |
514 | 514 | else unit | |
515 | 515 | }, wrapErr("invalid claimWx result")) | |
516 | 516 | if ((stakingReward == stakingReward)) | |
517 | 517 | then { | |
518 | 518 | let baseAssetAmountToConvert = valueOrElse(getInteger(keyBaseAssetAmountToConvert(baseAssetId)), 0) | |
519 | 519 | let shareAssetAmountToConvert = valueOrElse(getInteger(keyShareAssetAmountToConvert(baseAssetId)), 0) | |
520 | 520 | let checkFinalizationIsRequired = { | |
521 | 521 | let isFinalizationRequired = if (if ((stakingReward > 0)) | |
522 | 522 | then true | |
523 | 523 | else (baseAssetAmountToConvert > 0)) | |
524 | 524 | then true | |
525 | 525 | else (shareAssetAmountToConvert > 0) | |
526 | 526 | if (isFinalizationRequired) | |
527 | 527 | then true | |
528 | 528 | else throwErr("nothing to finalize") | |
529 | 529 | } | |
530 | 530 | if ((checkFinalizationIsRequired == checkFinalizationIsRequired)) | |
531 | 531 | then { | |
532 | 532 | let useStakingReward = if ((stakingReward > 0)) | |
533 | 533 | then { | |
534 | 534 | let lockPart = fraction(stakingReward, lockFraction, lockFractionMultiplier) | |
535 | 535 | let convertPart = (stakingReward - lockPart) | |
536 | 536 | let r = invoke(boostingContract, "userMaxDurationREADONLY", [toString(this)], nil) | |
537 | 537 | let lock = if ((lockPart > 0)) | |
538 | 538 | then match r { | |
539 | 539 | case _ => | |
540 | 540 | if (if (if ($isInstanceOf($match0._1, "String")) | |
541 | 541 | then $isInstanceOf($match0._2, "Int") | |
542 | 542 | else false) | |
543 | 543 | then $isInstanceOf($match0, "(String, Int)") | |
544 | 544 | else false) | |
545 | 545 | then { | |
546 | 546 | let function = $match0._1 | |
547 | 547 | let duration = $match0._2 | |
548 | 548 | if ((lockPart > 0)) | |
549 | 549 | then invoke(boostingContract, function, [duration], [AttachedPayment(wxAssetId, lockPart)]) | |
550 | 550 | else unit | |
551 | 551 | } | |
552 | 552 | else throwErr("invalid lock params") | |
553 | 553 | } | |
554 | 554 | else unit | |
555 | 555 | if ((lock == lock)) | |
556 | 556 | then { | |
557 | 557 | let convertedAmount = if ((convertPart > 0)) | |
558 | 558 | then { | |
559 | 559 | let inAssetId = wxAssetId | |
560 | 560 | let minimumToReceive = 0 | |
561 | 561 | let outAssetIdStr = assetIdToString(usdtAssetId) | |
562 | 562 | let targetAddress = toString(this) | |
563 | 563 | valueOrErrorMessage({ | |
564 | 564 | let @ = invoke(swapContract, "swap", [minimumToReceive, outAssetIdStr, targetAddress], [AttachedPayment(inAssetId, convertPart)]) | |
565 | 565 | if ($isInstanceOf(@, "Int")) | |
566 | 566 | then @ | |
567 | 567 | else unit | |
568 | 568 | }, wrapErr("invalid swap result")) | |
569 | 569 | } | |
570 | 570 | else 0 | |
571 | 571 | if ((convertedAmount == convertedAmount)) | |
572 | 572 | then { | |
573 | 573 | let lpAssetAmount = if ((convertedAmount > 0)) | |
574 | 574 | then { | |
575 | 575 | let minOutAmount = 0 | |
576 | 576 | let autoStake = true | |
577 | 577 | valueOrErrorMessage({ | |
578 | 578 | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(usdtAssetId, convertedAmount)]) | |
579 | 579 | if ($isInstanceOf(@, "Int")) | |
580 | 580 | then @ | |
581 | 581 | else unit | |
582 | 582 | }, wrapErr("invalid putOneTknV2 result")) | |
583 | 583 | } | |
584 | 584 | else 0 | |
585 | 585 | if ((lpAssetAmount == lpAssetAmount)) | |
586 | 586 | then lpAssetAmount | |
587 | 587 | else throw("Strict value is not equal to itself.") | |
588 | 588 | } | |
589 | 589 | else throw("Strict value is not equal to itself.") | |
590 | 590 | } | |
591 | 591 | else throw("Strict value is not equal to itself.") | |
592 | 592 | } | |
593 | 593 | else unit | |
594 | 594 | if ((useStakingReward == useStakingReward)) | |
595 | 595 | then { | |
596 | 596 | let getActions = if ((shareAssetAmountToConvert > 0)) | |
597 | 597 | then { | |
598 | 598 | let price = calcPrice(lpAssetId, shareAssetId) | |
599 | 599 | if ((price == price)) | |
600 | 600 | then { | |
601 | 601 | let unstakeAmount = toInt(fraction(toBigInt(shareAssetAmountToConvert), price, scale18BigInt, FLOOR)) | |
602 | 602 | let baseAssetAmount = { | |
603 | 603 | let outAssetId = baseAssetId | |
604 | 604 | let minOutAmount = 0 | |
605 | 605 | valueOrErrorMessage({ | |
606 | 606 | let @ = invoke(poolAddress, "unstakeAndGetOneTknV2", [unstakeAmount, assetIdToString(outAssetId), minOutAmount], nil) | |
607 | 607 | if ($isInstanceOf(@, "Int")) | |
608 | 608 | then @ | |
609 | 609 | else unit | |
610 | 610 | }, wrapErr("invalid unstakeAndGetOneTknV2 result")) | |
611 | 611 | } | |
612 | 612 | if ((baseAssetAmount == baseAssetAmount)) | |
613 | 613 | then { | |
614 | 614 | let shareAssetBurn = if ((shareAssetInfo.issuer == this)) | |
615 | 615 | then invoke(this, "burn", [shareAssetId, shareAssetAmountToConvert], nil) | |
616 | 616 | else throwErr("invalid share asset issuer") | |
617 | 617 | if ((shareAssetBurn == shareAssetBurn)) | |
618 | 618 | then { | |
619 | 619 | let priceGet = fraction(toBigInt(baseAssetAmount), scale18BigInt, toBigInt(shareAssetAmountToConvert), FLOOR) | |
620 | 620 | let priceGetUpdateActions = [BinaryEntry(keyPricePeriodGet(baseAssetId, period), toBytes(priceGet)), StringEntry(keyPriceGetHistory(baseAssetId), toString(priceGet))] | |
621 | 621 | priceGetUpdateActions | |
622 | 622 | } | |
623 | 623 | else throw("Strict value is not equal to itself.") | |
624 | 624 | } | |
625 | 625 | else throw("Strict value is not equal to itself.") | |
626 | 626 | } | |
627 | 627 | else throw("Strict value is not equal to itself.") | |
628 | 628 | } | |
629 | 629 | else nil | |
630 | 630 | if ((getActions == getActions)) | |
631 | 631 | then { | |
632 | 632 | let putActions = if ((baseAssetAmountToConvert > 0)) | |
633 | 633 | then { | |
634 | 634 | let lpAssetAmount = { | |
635 | 635 | let minOutAmount = 0 | |
636 | 636 | let autoStake = true | |
637 | 637 | valueOrErrorMessage({ | |
638 | 638 | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(baseAssetId, baseAssetAmountToConvert)]) | |
639 | 639 | if ($isInstanceOf(@, "Int")) | |
640 | 640 | then @ | |
641 | 641 | else unit | |
642 | 642 | }, wrapErr("invalid putOneTknV2 result")) | |
643 | 643 | } | |
644 | 644 | if ((lpAssetAmount == lpAssetAmount)) | |
645 | 645 | then { | |
646 | 646 | let price = calcPrice(lpAssetId, shareAssetId) | |
647 | 647 | if ((price == price)) | |
648 | 648 | then { | |
649 | 649 | let checkPrice = if ((value(toInt(price)) != 0)) | |
650 | 650 | then true | |
651 | 651 | else throw("price is ZERO") | |
652 | 652 | if ((checkPrice == checkPrice)) | |
653 | 653 | then { | |
654 | 654 | let shareAssetAmount = toInt(fraction(toBigInt(lpAssetAmount), scale18BigInt, price, FLOOR)) | |
655 | 655 | let checkShareAssetAmount = if ((value(toInt(price)) != 0)) | |
656 | 656 | then true | |
657 | 657 | else throw("shareAssetAmount is ZERO") | |
658 | 658 | if ((checkShareAssetAmount == checkShareAssetAmount)) | |
659 | 659 | then { | |
660 | 660 | let shareAssetReissue = if ((shareAssetInfo.issuer == this)) | |
661 | 661 | then invoke(this, "emit", [shareAssetId, shareAssetAmount], nil) | |
662 | 662 | else throwErr("invalid share asset issuer") | |
663 | 663 | if ((shareAssetReissue == shareAssetReissue)) | |
664 | 664 | then { | |
665 | 665 | let pricePut = fraction(toBigInt(baseAssetAmountToConvert), scale18BigInt, toBigInt(shareAssetAmount)) | |
666 | 666 | let pricePutUpdateActions = [BinaryEntry(keyPricePeriodPut(baseAssetId, period), toBytes(pricePut)), StringEntry(keyPricePutHistory(baseAssetId), toString(pricePut))] | |
667 | 667 | pricePutUpdateActions | |
668 | 668 | } | |
669 | 669 | else throw("Strict value is not equal to itself.") | |
670 | 670 | } | |
671 | 671 | else throw("Strict value is not equal to itself.") | |
672 | 672 | } | |
673 | 673 | else throw("Strict value is not equal to itself.") | |
674 | 674 | } | |
675 | 675 | else throw("Strict value is not equal to itself.") | |
676 | 676 | } | |
677 | 677 | else throw("Strict value is not equal to itself.") | |
678 | 678 | } | |
679 | 679 | else nil | |
680 | 680 | if ((putActions == putActions)) | |
681 | 681 | then { | |
682 | 682 | let newPeriod = (period + 1) | |
683 | 683 | let lastPrice = calcPrice(lpAssetId, shareAssetId) | |
684 | 684 | let actions = (([IntegerEntry(keyPeriod(baseAssetId), newPeriod), IntegerEntry(keyPeriodStartHeight(baseAssetId, newPeriod), height), IntegerEntry(keyShareAssetAmountToConvert(baseAssetId), 0), IntegerEntry(keyBaseAssetAmountToConvert(baseAssetId), 0), BinaryEntry(keyPricePeriod(baseAssetId, period), toBytes(lastPrice)), StringEntry(keyPriceHistory(baseAssetId), toString(lastPrice))] ++ putActions) ++ getActions) | |
685 | 685 | $Tuple2(actions, toBytes(lastPrice)) | |
686 | 686 | } | |
687 | 687 | else throw("Strict value is not equal to itself.") | |
688 | 688 | } | |
689 | 689 | else throw("Strict value is not equal to itself.") | |
690 | 690 | } | |
691 | 691 | else throw("Strict value is not equal to itself.") | |
692 | 692 | } | |
693 | 693 | else throw("Strict value is not equal to itself.") | |
694 | 694 | } | |
695 | 695 | else throw("Strict value is not equal to itself.") | |
696 | 696 | } | |
697 | 697 | else throw("Strict value is not equal to itself.") | |
698 | 698 | } | |
699 | 699 | else throw("Strict value is not equal to itself.") | |
700 | 700 | } | |
701 | 701 | else throw("Strict value is not equal to itself.") | |
702 | 702 | } | |
703 | 703 | else throw("Strict value is not equal to itself.") | |
704 | 704 | } | |
705 | 705 | ||
706 | 706 | ||
707 | 707 | @Verifier(tx) | |
708 | 708 | func verify () = { | |
709 | 709 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
710 | 710 | case pk: ByteVector => | |
711 | 711 | pk | |
712 | 712 | case _: Unit => | |
713 | 713 | tx.senderPublicKey | |
714 | 714 | case _ => | |
715 | 715 | throw("Match error") | |
716 | 716 | } | |
717 | 717 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
718 | 718 | } | |
719 | 719 |
github/deemru/w8io/026f985 82.66 ms ◑