tx · FAoSi1SEpsswjSZZQaHGjhnBymC5a7Ba77XMpKfhuqPb 3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV: -0.03000000 Waves 2023.04.26 12:56 [2551359] smart account 3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV > SELF 0.00000000 Waves
{ "type": 13, "id": "FAoSi1SEpsswjSZZQaHGjhnBymC5a7Ba77XMpKfhuqPb", "fee": 3000000, "feeAssetId": null, "timestamp": 1682503049830, "version": 2, "chainId": 84, "sender": "3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV", "senderPublicKey": "F4oaTkX67vt2MEsXLJJ8a7gaURGjW7x8fkvGfdEiH5oy", "proofs": [ "2nZkUfF3Chh5xedHxjGLgMXczJi7jovwwY5UHzTRqCX2U3bsQYMXS5Yavm7GztNb8ugfvuUFoV3oJ95Nn8kYTXHN" ], "script": "base64:BgIzCAISAwoBCBIAEgQKAgIBEgQKAgIBEgcKBQgICAgIEgASBAoCCAgSABIECgIICBIDCgEIQQAJc2VwYXJhdG9yAgJfXwASc2hhcmVBc3NldERlY2ltYWxzAAgAC3dhdmVzU3RyaW5nAgVXQVZFUwAHc2NhbGUxOACAgJC7utat8A0ADXNjYWxlMThCaWdJbnQJALYCAQUHc2NhbGUxOAEHd3JhcEVycgEDbXNnCQC5CQIJAMwIAgIWbHBfc3Rha2luZ19wb29scy5yaWRlOgkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnARJlcnJLZXlJc05vdERlZmluZWQCB2FkZHJlc3MDa2V5CQEHd3JhcEVycgEJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQUHYWRkcmVzcwkAzAgCAgEuCQDMCAIFA2tleQkAzAgCAg8gaXMgbm90IGRlZmluZWQFA25pbAIAAQxnZXRTdHJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUHYWRkcmVz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ECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleRTp110=", "height": 2551359, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H69tGjR2Q2UBryiPWuzoZHjwSkaxQfsCsZFgbcFbZYCP Next: HyCJVY3ypdnWdQx4jtDX5JhGoWP5hZbGyNvvCo3kLktw Diff:
Old | New | Differences | |
---|---|---|---|
363 | 363 | if ((claimShareAssetInvocation == claimShareAssetInvocation)) | |
364 | 364 | then { | |
365 | 365 | let baseAssetAmountToConvert = valueOrElse(getInteger(keyBaseAssetAmountToConvert(baseAssetId)), 0) | |
366 | - | let userBaseAssetAmountToConvert = | |
366 | + | let userBaseAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
367 | 367 | $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) | |
368 | 368 | } | |
369 | 369 | else throw("Strict value is not equal to itself.") | |
395 | 395 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
396 | 396 | if ((period == period)) | |
397 | 397 | then { | |
398 | - | let userBaseAssetAmountToConvert = | |
398 | + | let userBaseAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
399 | 399 | let checkAmountToConvert = if ((userBaseAssetAmountToConvert > 0)) | |
400 | 400 | then true | |
401 | 401 | else throwErr("nothing to claim") | |
439 | 439 | if ((baseAssetId == baseAssetId)) | |
440 | 440 | then { | |
441 | 441 | let userAddress = i.caller | |
442 | - | let $ | |
443 | - | let poolAddress = $ | |
444 | - | let lpAssetId = $ | |
442 | + | let $t01618816377 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
443 | + | let poolAddress = $t01618816377._1 | |
444 | + | let lpAssetId = $t01618816377._2 | |
445 | 445 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
446 | 446 | let userShareAssetAmountToConvertPeriodOption = getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
447 | 447 | let claimBaseAssetInvocation = if ((userShareAssetAmountToConvertPeriodOption == unit)) | |
455 | 455 | if ((claimBaseAssetInvocation == claimBaseAssetInvocation)) | |
456 | 456 | then { | |
457 | 457 | let shareAssetAmountToConvert = valueOrElse(getInteger(keyShareAssetAmountToConvert(baseAssetId)), 0) | |
458 | - | let userShareAssetAmountToConvert = | |
458 | + | let userShareAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserShareAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
459 | 459 | $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) | |
460 | 460 | } | |
461 | 461 | else throw("Strict value is not equal to itself.") | |
489 | 489 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
490 | 490 | if ((period == period)) | |
491 | 491 | then { | |
492 | - | let userShareAssetAmountToConvert = | |
492 | + | let userShareAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserShareAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
493 | 493 | let userShareAssetAmountToConvertPeriod = valueOrErrorMessage(getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)), wrapErr("failed to get period")) | |
494 | 494 | let checkPeriod = if ((period > userShareAssetAmountToConvertPeriod)) | |
495 | 495 | then true | |
538 | 538 | } | |
539 | 539 | if ((checkDelay == checkDelay)) | |
540 | 540 | then { | |
541 | - | let $ | |
542 | - | let poolAddress = $ | |
543 | - | let lpAssetId = $ | |
541 | + | let $t02181821999 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
542 | + | let poolAddress = $t02181821999._1 | |
543 | + | let lpAssetId = $t02181821999._2 | |
544 | 544 | let stakingReward = valueOrErrorMessage({ | |
545 | 545 | let @ = invoke(stakingContract, "claimWxDoNotThrow", [assetIdToString(lpAssetId)], nil) | |
546 | 546 | 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 | 125 | func keyHistoryEntry (baseAssetId,operation,period,userAddress,txId) = makeString(["%s%s%s%s", "history", toUtf8String(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 keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
135 | 135 | case s: String => | |
136 | 136 | fromBase58String(s) | |
137 | 137 | case _: Unit => | |
138 | 138 | unit | |
139 | 139 | case _ => | |
140 | 140 | throw("Match error") | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
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 | let permissionDeniedError = throw("Permission denied") | |
155 | 155 | ||
156 | 156 | func mustThis (i) = if ((i.caller == this)) | |
157 | 157 | then true | |
158 | 158 | else permissionDeniedError | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
162 | 162 | case pk: ByteVector => | |
163 | 163 | if ((i.callerPublicKey == pk)) | |
164 | 164 | then true | |
165 | 165 | else permissionDeniedError | |
166 | 166 | case _: Unit => | |
167 | 167 | mustThis(i) | |
168 | 168 | case _ => | |
169 | 169 | throw("Match error") | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | let shutdown = valueOrElse(getBoolean(keyShutdown()), false) | |
174 | 174 | ||
175 | 175 | func shutdownCheck (i) = if (if (!(shutdown)) | |
176 | 176 | then true | |
177 | 177 | else mustManager(i)) | |
178 | 178 | then true | |
179 | 179 | else throw("operation is disabled") | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract())) | |
183 | 183 | ||
184 | 184 | let lpStakingContract = addressFromStringValue(getStrOrFail(this, keyLpStakingContract())) | |
185 | 185 | ||
186 | 186 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract())) | |
187 | 187 | ||
188 | 188 | let boostingContract = addressFromStringValue(getStrOrFail(this, keyBoostingContract())) | |
189 | 189 | ||
190 | 190 | let swapContract = addressFromStringValue(getStrOrFail(this, keySwapContract())) | |
191 | 191 | ||
192 | 192 | let assetsStoreContract = addressFromStringValue(getStrOrFail(this, keyAssetsStoreContract())) | |
193 | 193 | ||
194 | 194 | let usdtAssetId = parseAssetId(getStrOrFail(this, keyUsdtAssetId())) | |
195 | 195 | ||
196 | 196 | let wxAssetId = parseAssetId(getStrOrFail(this, keyWxAssetId())) | |
197 | 197 | ||
198 | 198 | let minDelayDefault = 1440 | |
199 | 199 | ||
200 | 200 | let minDelay = valueOrElse(getInteger(this, keyMinDelay()), minDelayDefault) | |
201 | 201 | ||
202 | 202 | let lockFractionMultiplier = 100000000 | |
203 | 203 | ||
204 | 204 | let lockFractionDefault = fraction(1, lockFractionMultiplier, 2) | |
205 | 205 | ||
206 | 206 | let lockFraction = valueOrElse(getInteger(this, keyLockFraction()), lockFractionDefault) | |
207 | 207 | ||
208 | 208 | func getPoolInfo (amountAssetId) = { | |
209 | 209 | let amountAssetIdStr = assetIdToString(amountAssetId) | |
210 | 210 | let priceAssetIdStr = assetIdToString(usdtAssetId) | |
211 | 211 | let poolInfoOption = { | |
212 | 212 | let @ = invoke(factoryContract, "poolInfoREADONLY", [amountAssetIdStr, priceAssetIdStr], nil) | |
213 | 213 | if ($isInstanceOf(@, "(Address, ByteVector)")) | |
214 | 214 | then @ | |
215 | 215 | else unit | |
216 | 216 | } | |
217 | 217 | poolInfoOption | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func calcPrice (lpAssetId,shareAssetId) = { | |
222 | 222 | let shareAssetInfo = valueOrErrorMessage(assetInfo(shareAssetId), "failed to get share asset info") | |
223 | 223 | let shareAssetEmission = shareAssetInfo.quantity | |
224 | 224 | let stakedAmount = ensurePositive(valueOrErrorMessage({ | |
225 | 225 | let @ = invoke(stakingContract, "stakedByUserREADONLY", [assetIdToString(lpAssetId), toString(this)], nil) | |
226 | 226 | if ($isInstanceOf(@, "Int")) | |
227 | 227 | then @ | |
228 | 228 | else unit | |
229 | 229 | }, wrapErr("invalid stakedByUserREADONLY result"))) | |
230 | 230 | let price = if ((shareAssetEmission == 0)) | |
231 | 231 | then scale18BigInt | |
232 | 232 | else fraction(toBigInt(stakedAmount), scale18BigInt, toBigInt(shareAssetEmission), FLOOR) | |
233 | 233 | price | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | @Callable(i) | |
238 | 238 | func setManager (pendingManagerPublicKey) = { | |
239 | 239 | let checkCaller = mustManager(i) | |
240 | 240 | if ((checkCaller == checkCaller)) | |
241 | 241 | then { | |
242 | 242 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
243 | 243 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
244 | 244 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
245 | 245 | else throw("Strict value is not equal to itself.") | |
246 | 246 | } | |
247 | 247 | else throw("Strict value is not equal to itself.") | |
248 | 248 | } | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | ||
252 | 252 | @Callable(i) | |
253 | 253 | func confirmManager () = { | |
254 | 254 | let pm = pendingManagerPublicKeyOrUnit() | |
255 | 255 | let hasPM = if (isDefined(pm)) | |
256 | 256 | then true | |
257 | 257 | else throwErr("no pending manager") | |
258 | 258 | if ((hasPM == hasPM)) | |
259 | 259 | then { | |
260 | 260 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
261 | 261 | then true | |
262 | 262 | else throwErr("you are not pending manager") | |
263 | 263 | if ((checkPM == checkPM)) | |
264 | 264 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
265 | 265 | else throw("Strict value is not equal to itself.") | |
266 | 266 | } | |
267 | 267 | else throw("Strict value is not equal to itself.") | |
268 | 268 | } | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | ||
272 | 272 | @Callable(i) | |
273 | 273 | func emit (assetId,amount) = { | |
274 | 274 | let checkCaller = mustThis(i) | |
275 | 275 | if ((checkCaller == checkCaller)) | |
276 | 276 | then { | |
277 | 277 | let isReissuable = true | |
278 | 278 | $Tuple2([Reissue(assetId, amount, isReissuable)], amount) | |
279 | 279 | } | |
280 | 280 | else throw("Strict value is not equal to itself.") | |
281 | 281 | } | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | ||
285 | 285 | @Callable(i) | |
286 | 286 | func burn (assetId,amount) = { | |
287 | 287 | let checkCaller = mustThis(i) | |
288 | 288 | if ((checkCaller == checkCaller)) | |
289 | 289 | then $Tuple2([Burn(assetId, amount)], amount) | |
290 | 290 | else throw("Strict value is not equal to itself.") | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | ||
295 | 295 | @Callable(i) | |
296 | 296 | func create (baseAssetIdStr,shareAssetIdStr,shareAssetName,shareAssetDescription,shareAssetLogo) = { | |
297 | 297 | let shareAssetLabel = "STAKING_LP" | |
298 | 298 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
299 | 299 | let checks = [mustManager(i), if (isDefined(getPoolInfo(baseAssetId))) | |
300 | 300 | then true | |
301 | 301 | else throwErr("invalid base asset")] | |
302 | 302 | if ((checks == checks)) | |
303 | 303 | then { | |
304 | 304 | let commonState = [IntegerEntry(keyPeriod(baseAssetId), 0)] | |
305 | 305 | if ((shareAssetIdStr == "")) | |
306 | 306 | then { | |
307 | 307 | let shareAssetIssueAmount = 1 | |
308 | 308 | let shareAssetIssueAction = Issue(shareAssetName, shareAssetDescription, shareAssetIssueAmount, shareAssetDecimals, true) | |
309 | 309 | let calculatedShareAssetId = calculateAssetId(shareAssetIssueAction) | |
310 | 310 | let shareAssetBurnAction = Burn(calculatedShareAssetId, shareAssetIssueAmount) | |
311 | 311 | let calculatedShareAssetIdStr = toBase58String(calculatedShareAssetId) | |
312 | 312 | let createOrUpdate = invoke(assetsStoreContract, "createOrUpdate", [calculatedShareAssetIdStr, shareAssetLogo, false], nil) | |
313 | 313 | if ((createOrUpdate == createOrUpdate)) | |
314 | 314 | then { | |
315 | 315 | let addLabel = invoke(assetsStoreContract, "addLabel", [calculatedShareAssetIdStr, shareAssetLabel], nil) | |
316 | 316 | if ((addLabel == addLabel)) | |
317 | 317 | then $Tuple2((commonState ++ [shareAssetIssueAction, shareAssetBurnAction, StringEntry(keyShareAssetId(baseAssetId), calculatedShareAssetIdStr), StringEntry(keyBaseAssetId(calculatedShareAssetId), baseAssetIdStr)]), calculatedShareAssetIdStr) | |
318 | 318 | else throw("Strict value is not equal to itself.") | |
319 | 319 | } | |
320 | 320 | else throw("Strict value is not equal to itself.") | |
321 | 321 | } | |
322 | 322 | else { | |
323 | 323 | let shareAssetId = fromBase58String(shareAssetIdStr) | |
324 | 324 | let shareAssetInfo = valueOrErrorMessage(assetInfo(shareAssetId), wrapErr("invalid share asset id")) | |
325 | 325 | let checkIssuer = if ((shareAssetInfo.issuer == lpStakingContract)) | |
326 | 326 | then true | |
327 | 327 | else throwErr("invalid share asset id issuer") | |
328 | 328 | if ((checkIssuer == checkIssuer)) | |
329 | 329 | then $Tuple2((commonState ++ [StringEntry(keyShareAssetId(baseAssetId), shareAssetIdStr), StringEntry(keyBaseAssetId(shareAssetId), baseAssetIdStr)]), shareAssetIdStr) | |
330 | 330 | else throw("Strict value is not equal to itself.") | |
331 | 331 | } | |
332 | 332 | } | |
333 | 333 | else throw("Strict value is not equal to itself.") | |
334 | 334 | } | |
335 | 335 | ||
336 | 336 | ||
337 | 337 | ||
338 | 338 | @Callable(i) | |
339 | 339 | func put () = { | |
340 | 340 | let pmt = if ((size(i.payments) == 1)) | |
341 | 341 | then i.payments[0] | |
342 | 342 | else throwErr("exactly 1 payment is expected") | |
343 | 343 | let baseAssetId = pmt.assetId | |
344 | 344 | let userAddress = i.caller | |
345 | 345 | let checks = [shutdownCheck(i), if (isDefined(getString(keyShareAssetId(baseAssetId)))) | |
346 | 346 | then true | |
347 | 347 | else throwErr("invalid asset")] | |
348 | 348 | if ((checks == checks)) | |
349 | 349 | then { | |
350 | 350 | let $t01167511778 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
351 | 351 | let poolAddress = $t01167511778._1 | |
352 | 352 | let lpAssetId = $t01167511778._2 | |
353 | 353 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
354 | 354 | let userBaseAssetAmountToConvertPeriodOption = getInteger(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
355 | 355 | let claimShareAssetInvocation = if ((userBaseAssetAmountToConvertPeriodOption == unit)) | |
356 | 356 | then unit | |
357 | 357 | else { | |
358 | 358 | let userBaseAssetAmountToConvertPeriod = value(userBaseAssetAmountToConvertPeriodOption) | |
359 | 359 | if ((userBaseAssetAmountToConvertPeriod == period)) | |
360 | 360 | then unit | |
361 | 361 | else invoke(this, "claimShareAsset", [assetIdToString(baseAssetId), toString(userAddress)], nil) | |
362 | 362 | } | |
363 | 363 | if ((claimShareAssetInvocation == claimShareAssetInvocation)) | |
364 | 364 | then { | |
365 | 365 | let baseAssetAmountToConvert = valueOrElse(getInteger(keyBaseAssetAmountToConvert(baseAssetId)), 0) | |
366 | - | let userBaseAssetAmountToConvert = | |
366 | + | let userBaseAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
367 | 367 | $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) | |
368 | 368 | } | |
369 | 369 | else throw("Strict value is not equal to itself.") | |
370 | 370 | } | |
371 | 371 | else throw("Strict value is not equal to itself.") | |
372 | 372 | } | |
373 | 373 | ||
374 | 374 | ||
375 | 375 | ||
376 | 376 | @Callable(i) | |
377 | 377 | func claimShareAsset (baseAssetIdStr,userAddressStr) = { | |
378 | 378 | let checks = [shutdownCheck(i)] | |
379 | 379 | if ((checks == checks)) | |
380 | 380 | then { | |
381 | 381 | let userAddress = if ((userAddressStr == "")) | |
382 | 382 | then i.caller | |
383 | 383 | else { | |
384 | 384 | let checkCaller = mustThis(i) | |
385 | 385 | if ((checkCaller == checkCaller)) | |
386 | 386 | then valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address")) | |
387 | 387 | else throw("Strict value is not equal to itself.") | |
388 | 388 | } | |
389 | 389 | if ((userAddress == userAddress)) | |
390 | 390 | then { | |
391 | 391 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
392 | 392 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
393 | 393 | if ((shareAssetId == shareAssetId)) | |
394 | 394 | then { | |
395 | 395 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
396 | 396 | if ((period == period)) | |
397 | 397 | then { | |
398 | - | let userBaseAssetAmountToConvert = | |
398 | + | let userBaseAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
399 | 399 | let checkAmountToConvert = if ((userBaseAssetAmountToConvert > 0)) | |
400 | 400 | then true | |
401 | 401 | else throwErr("nothing to claim") | |
402 | 402 | if ((checkAmountToConvert == checkAmountToConvert)) | |
403 | 403 | then { | |
404 | 404 | let userBaseAssetAmountToConvertPeriod = valueOrErrorMessage(getInteger(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress)), wrapErr("failed to get period")) | |
405 | 405 | let checkPeriod = if ((period > userBaseAssetAmountToConvertPeriod)) | |
406 | 406 | then true | |
407 | 407 | else throwErr("invalid period") | |
408 | 408 | if ((checkPeriod == checkPeriod)) | |
409 | 409 | then { | |
410 | 410 | let price = toBigInt(valueOrErrorMessage(getBinary(keyPricePeriodPut(baseAssetId, userBaseAssetAmountToConvertPeriod)), wrapErr("failed to get price"))) | |
411 | 411 | let shareAssetAmount = toInt(fraction(toBigInt(userBaseAssetAmountToConvert), scale18BigInt, price)) | |
412 | 412 | $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) | |
413 | 413 | } | |
414 | 414 | else throw("Strict value is not equal to itself.") | |
415 | 415 | } | |
416 | 416 | else throw("Strict value is not equal to itself.") | |
417 | 417 | } | |
418 | 418 | else throw("Strict value is not equal to itself.") | |
419 | 419 | } | |
420 | 420 | else throw("Strict value is not equal to itself.") | |
421 | 421 | } | |
422 | 422 | else throw("Strict value is not equal to itself.") | |
423 | 423 | } | |
424 | 424 | else throw("Strict value is not equal to itself.") | |
425 | 425 | } | |
426 | 426 | ||
427 | 427 | ||
428 | 428 | ||
429 | 429 | @Callable(i) | |
430 | 430 | func get () = { | |
431 | 431 | let checks = [shutdownCheck(i)] | |
432 | 432 | if ((checks == checks)) | |
433 | 433 | then { | |
434 | 434 | let pmt = if ((size(i.payments) == 1)) | |
435 | 435 | then i.payments[0] | |
436 | 436 | else throwErr("exactly 1 payment is expected") | |
437 | 437 | let shareAssetId = pmt.assetId | |
438 | 438 | let baseAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyBaseAssetId(shareAssetId)), wrapErr("invalid share asset id")))) | |
439 | 439 | if ((baseAssetId == baseAssetId)) | |
440 | 440 | then { | |
441 | 441 | let userAddress = i.caller | |
442 | - | let $ | |
443 | - | let poolAddress = $ | |
444 | - | let lpAssetId = $ | |
442 | + | let $t01618816377 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
443 | + | let poolAddress = $t01618816377._1 | |
444 | + | let lpAssetId = $t01618816377._2 | |
445 | 445 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
446 | 446 | let userShareAssetAmountToConvertPeriodOption = getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
447 | 447 | let claimBaseAssetInvocation = if ((userShareAssetAmountToConvertPeriodOption == unit)) | |
448 | 448 | then unit | |
449 | 449 | else { | |
450 | 450 | let userShareAssetAmountToConvertPeriod = value(userShareAssetAmountToConvertPeriodOption) | |
451 | 451 | if ((userShareAssetAmountToConvertPeriod == period)) | |
452 | 452 | then unit | |
453 | 453 | else invoke(this, "claimBaseAsset", [assetIdToString(baseAssetId), toString(userAddress)], nil) | |
454 | 454 | } | |
455 | 455 | if ((claimBaseAssetInvocation == claimBaseAssetInvocation)) | |
456 | 456 | then { | |
457 | 457 | let shareAssetAmountToConvert = valueOrElse(getInteger(keyShareAssetAmountToConvert(baseAssetId)), 0) | |
458 | - | let userShareAssetAmountToConvert = | |
458 | + | let userShareAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserShareAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
459 | 459 | $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) | |
460 | 460 | } | |
461 | 461 | else throw("Strict value is not equal to itself.") | |
462 | 462 | } | |
463 | 463 | else throw("Strict value is not equal to itself.") | |
464 | 464 | } | |
465 | 465 | else throw("Strict value is not equal to itself.") | |
466 | 466 | } | |
467 | 467 | ||
468 | 468 | ||
469 | 469 | ||
470 | 470 | @Callable(i) | |
471 | 471 | func claimBaseAsset (baseAssetIdStr,userAddressStr) = { | |
472 | 472 | let checks = [shutdownCheck(i)] | |
473 | 473 | if ((checks == checks)) | |
474 | 474 | then { | |
475 | 475 | let userAddress = if ((userAddressStr == "")) | |
476 | 476 | then i.caller | |
477 | 477 | else { | |
478 | 478 | let checkCaller = mustThis(i) | |
479 | 479 | if ((checkCaller == checkCaller)) | |
480 | 480 | then valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address")) | |
481 | 481 | else throw("Strict value is not equal to itself.") | |
482 | 482 | } | |
483 | 483 | if ((userAddress == userAddress)) | |
484 | 484 | then { | |
485 | 485 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
486 | 486 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
487 | 487 | if ((shareAssetId == shareAssetId)) | |
488 | 488 | then { | |
489 | 489 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
490 | 490 | if ((period == period)) | |
491 | 491 | then { | |
492 | - | let userShareAssetAmountToConvert = | |
492 | + | let userShareAssetAmountToConvert = value(parseInt(split(valueOrElse(getString(keyUserShareAssetAmountToConvert(baseAssetId, userAddress)), "%d%d%d__0__0"), separator)[1])) | |
493 | 493 | let userShareAssetAmountToConvertPeriod = valueOrErrorMessage(getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)), wrapErr("failed to get period")) | |
494 | 494 | let checkPeriod = if ((period > userShareAssetAmountToConvertPeriod)) | |
495 | 495 | then true | |
496 | 496 | else throwErr("invalid period") | |
497 | 497 | if ((checkPeriod == checkPeriod)) | |
498 | 498 | then { | |
499 | 499 | let price = toBigInt(valueOrErrorMessage(getBinary(keyPricePeriodGet(baseAssetId, userShareAssetAmountToConvertPeriod)), wrapErr("failed to get price"))) | |
500 | 500 | let baseAssetAmount = toInt(fraction(toBigInt(userShareAssetAmountToConvert), price, scale18BigInt)) | |
501 | 501 | $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) | |
502 | 502 | } | |
503 | 503 | else throw("Strict value is not equal to itself.") | |
504 | 504 | } | |
505 | 505 | else throw("Strict value is not equal to itself.") | |
506 | 506 | } | |
507 | 507 | else throw("Strict value is not equal to itself.") | |
508 | 508 | } | |
509 | 509 | else throw("Strict value is not equal to itself.") | |
510 | 510 | } | |
511 | 511 | else throw("Strict value is not equal to itself.") | |
512 | 512 | } | |
513 | 513 | ||
514 | 514 | ||
515 | 515 | ||
516 | 516 | @Callable(i) | |
517 | 517 | func finalize (baseAssetIdStr) = { | |
518 | 518 | let checks = [shutdownCheck(i)] | |
519 | 519 | if ((checks == checks)) | |
520 | 520 | then { | |
521 | 521 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
522 | 522 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
523 | 523 | if ((shareAssetId == shareAssetId)) | |
524 | 524 | then { | |
525 | 525 | let shareAssetInfo = valueOrErrorMessage(assetInfo(shareAssetId), wrapErr("invalid share asset id")) | |
526 | 526 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
527 | 527 | if ((period == period)) | |
528 | 528 | then { | |
529 | 529 | let periodStartHeightOption = getInteger(keyPeriodStartHeight(baseAssetId, period)) | |
530 | 530 | let checkDelay = if ((periodStartHeightOption == unit)) | |
531 | 531 | then unit | |
532 | 532 | else { | |
533 | 533 | let delay = (height - value(periodStartHeightOption)) | |
534 | 534 | let blocksToWait = max([0, (minDelay - delay)]) | |
535 | 535 | if ((blocksToWait == 0)) | |
536 | 536 | then unit | |
537 | 537 | else throwErr(makeString(["finalization will be possible in ", toString(blocksToWait), " blocks"], "")) | |
538 | 538 | } | |
539 | 539 | if ((checkDelay == checkDelay)) | |
540 | 540 | then { | |
541 | - | let $ | |
542 | - | let poolAddress = $ | |
543 | - | let lpAssetId = $ | |
541 | + | let $t02181821999 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
542 | + | let poolAddress = $t02181821999._1 | |
543 | + | let lpAssetId = $t02181821999._2 | |
544 | 544 | let stakingReward = valueOrErrorMessage({ | |
545 | 545 | let @ = invoke(stakingContract, "claimWxDoNotThrow", [assetIdToString(lpAssetId)], nil) | |
546 | 546 | if ($isInstanceOf(@, "Int")) | |
547 | 547 | then @ | |
548 | 548 | else unit | |
549 | 549 | }, wrapErr("invalid claimWx result")) | |
550 | 550 | if ((stakingReward == stakingReward)) | |
551 | 551 | then { | |
552 | 552 | let baseAssetAmountToConvert = valueOrElse(getInteger(keyBaseAssetAmountToConvert(baseAssetId)), 0) | |
553 | 553 | let shareAssetAmountToConvert = valueOrElse(getInteger(keyShareAssetAmountToConvert(baseAssetId)), 0) | |
554 | 554 | let checkFinalizationIsRequired = { | |
555 | 555 | let isFinalizationRequired = if (if ((stakingReward > 0)) | |
556 | 556 | then true | |
557 | 557 | else (baseAssetAmountToConvert > 0)) | |
558 | 558 | then true | |
559 | 559 | else (shareAssetAmountToConvert > 0) | |
560 | 560 | if (isFinalizationRequired) | |
561 | 561 | then true | |
562 | 562 | else throwErr("nothing to finalize") | |
563 | 563 | } | |
564 | 564 | if ((checkFinalizationIsRequired == checkFinalizationIsRequired)) | |
565 | 565 | then { | |
566 | 566 | let useStakingReward = if ((stakingReward > 0)) | |
567 | 567 | then { | |
568 | 568 | let lockPart = fraction(stakingReward, lockFraction, lockFractionMultiplier) | |
569 | 569 | let convertPart = (stakingReward - lockPart) | |
570 | 570 | let r = invoke(boostingContract, "userMaxDurationREADONLY", [toString(this)], nil) | |
571 | 571 | let lock = if ((lockPart > 0)) | |
572 | 572 | then match r { | |
573 | 573 | case _ => | |
574 | 574 | if (if (if ($isInstanceOf($match0._1, "String")) | |
575 | 575 | then $isInstanceOf($match0._2, "Int") | |
576 | 576 | else false) | |
577 | 577 | then $isInstanceOf($match0, "(String, Int)") | |
578 | 578 | else false) | |
579 | 579 | then { | |
580 | 580 | let function = $match0._1 | |
581 | 581 | let duration = $match0._2 | |
582 | 582 | if ((lockPart > 0)) | |
583 | 583 | then invoke(boostingContract, function, [duration], [AttachedPayment(wxAssetId, lockPart)]) | |
584 | 584 | else unit | |
585 | 585 | } | |
586 | 586 | else throwErr("invalid lock params") | |
587 | 587 | } | |
588 | 588 | else unit | |
589 | 589 | if ((lock == lock)) | |
590 | 590 | then { | |
591 | 591 | let convertedAmount = if ((convertPart > 0)) | |
592 | 592 | then { | |
593 | 593 | let inAssetId = wxAssetId | |
594 | 594 | let minimumToReceive = 0 | |
595 | 595 | let outAssetIdStr = assetIdToString(usdtAssetId) | |
596 | 596 | let targetAddress = toString(this) | |
597 | 597 | valueOrErrorMessage({ | |
598 | 598 | let @ = invoke(swapContract, "swap", [minimumToReceive, outAssetIdStr, targetAddress], [AttachedPayment(inAssetId, convertPart)]) | |
599 | 599 | if ($isInstanceOf(@, "Int")) | |
600 | 600 | then @ | |
601 | 601 | else unit | |
602 | 602 | }, wrapErr("invalid swap result")) | |
603 | 603 | } | |
604 | 604 | else 0 | |
605 | 605 | if ((convertedAmount == convertedAmount)) | |
606 | 606 | then { | |
607 | 607 | let lpAssetAmount = if ((convertedAmount > 0)) | |
608 | 608 | then { | |
609 | 609 | let minOutAmount = 0 | |
610 | 610 | let autoStake = true | |
611 | 611 | valueOrErrorMessage({ | |
612 | 612 | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(usdtAssetId, convertedAmount)]) | |
613 | 613 | if ($isInstanceOf(@, "Int")) | |
614 | 614 | then @ | |
615 | 615 | else unit | |
616 | 616 | }, wrapErr("invalid putOneTknV2 result")) | |
617 | 617 | } | |
618 | 618 | else 0 | |
619 | 619 | if ((lpAssetAmount == lpAssetAmount)) | |
620 | 620 | then lpAssetAmount | |
621 | 621 | else throw("Strict value is not equal to itself.") | |
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 unit | |
628 | 628 | if ((useStakingReward == useStakingReward)) | |
629 | 629 | then { | |
630 | 630 | let getActions = if ((shareAssetAmountToConvert > 0)) | |
631 | 631 | then { | |
632 | 632 | let price = calcPrice(lpAssetId, shareAssetId) | |
633 | 633 | if ((price == price)) | |
634 | 634 | then { | |
635 | 635 | let unstakeAmount = toInt(fraction(toBigInt(shareAssetAmountToConvert), price, scale18BigInt, FLOOR)) | |
636 | 636 | let baseAssetAmount = { | |
637 | 637 | let outAssetId = baseAssetId | |
638 | 638 | let minOutAmount = 0 | |
639 | 639 | valueOrErrorMessage({ | |
640 | 640 | let @ = invoke(poolAddress, "unstakeAndGetOneTknV2", [unstakeAmount, assetIdToString(outAssetId), minOutAmount], nil) | |
641 | 641 | if ($isInstanceOf(@, "Int")) | |
642 | 642 | then @ | |
643 | 643 | else unit | |
644 | 644 | }, wrapErr("invalid unstakeAndGetOneTknV2 result")) | |
645 | 645 | } | |
646 | 646 | if ((baseAssetAmount == baseAssetAmount)) | |
647 | 647 | then { | |
648 | 648 | let shareAssetBurn = if ((shareAssetInfo.issuer == this)) | |
649 | 649 | then invoke(this, "burn", [shareAssetId, shareAssetAmountToConvert], nil) | |
650 | 650 | else throwErr("invalid share asset issuer") | |
651 | 651 | if ((shareAssetBurn == shareAssetBurn)) | |
652 | 652 | then { | |
653 | 653 | let priceGet = fraction(toBigInt(baseAssetAmount), scale18BigInt, toBigInt(shareAssetAmountToConvert), FLOOR) | |
654 | 654 | let priceGetUpdateActions = [BinaryEntry(keyPricePeriodGet(baseAssetId, period), toBytes(priceGet)), StringEntry(keyPriceGetHistory(baseAssetId), toString(priceGet))] | |
655 | 655 | priceGetUpdateActions | |
656 | 656 | } | |
657 | 657 | else throw("Strict value is not equal to itself.") | |
658 | 658 | } | |
659 | 659 | else throw("Strict value is not equal to itself.") | |
660 | 660 | } | |
661 | 661 | else throw("Strict value is not equal to itself.") | |
662 | 662 | } | |
663 | 663 | else nil | |
664 | 664 | if ((getActions == getActions)) | |
665 | 665 | then { | |
666 | 666 | let putActions = if ((baseAssetAmountToConvert > 0)) | |
667 | 667 | then { | |
668 | 668 | let lpAssetAmount = { | |
669 | 669 | let minOutAmount = 0 | |
670 | 670 | let autoStake = true | |
671 | 671 | valueOrErrorMessage({ | |
672 | 672 | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(baseAssetId, baseAssetAmountToConvert)]) | |
673 | 673 | if ($isInstanceOf(@, "Int")) | |
674 | 674 | then @ | |
675 | 675 | else unit | |
676 | 676 | }, wrapErr("invalid putOneTknV2 result")) | |
677 | 677 | } | |
678 | 678 | if ((lpAssetAmount == lpAssetAmount)) | |
679 | 679 | then { | |
680 | 680 | let price = calcPrice(lpAssetId, shareAssetId) | |
681 | 681 | if ((price == price)) | |
682 | 682 | then { | |
683 | 683 | let checkPrice = if ((value(toInt(price)) != 0)) | |
684 | 684 | then true | |
685 | 685 | else throw("price is ZERO") | |
686 | 686 | if ((checkPrice == checkPrice)) | |
687 | 687 | then { | |
688 | 688 | let shareAssetAmount = toInt(fraction(toBigInt(lpAssetAmount), scale18BigInt, price, FLOOR)) | |
689 | 689 | let checkShareAssetAmount = if ((value(toInt(price)) != 0)) | |
690 | 690 | then true | |
691 | 691 | else throw("shareAssetAmount is ZERO") | |
692 | 692 | if ((checkShareAssetAmount == checkShareAssetAmount)) | |
693 | 693 | then { | |
694 | 694 | let shareAssetReissue = if ((shareAssetInfo.issuer == this)) | |
695 | 695 | then invoke(this, "emit", [shareAssetId, shareAssetAmount], nil) | |
696 | 696 | else throwErr("invalid share asset issuer") | |
697 | 697 | if ((shareAssetReissue == shareAssetReissue)) | |
698 | 698 | then { | |
699 | 699 | let pricePut = fraction(toBigInt(baseAssetAmountToConvert), scale18BigInt, toBigInt(shareAssetAmount)) | |
700 | 700 | let pricePutUpdateActions = [BinaryEntry(keyPricePeriodPut(baseAssetId, period), toBytes(pricePut)), StringEntry(keyPricePutHistory(baseAssetId), toString(pricePut))] | |
701 | 701 | pricePutUpdateActions | |
702 | 702 | } | |
703 | 703 | else throw("Strict value is not equal to itself.") | |
704 | 704 | } | |
705 | 705 | else throw("Strict value is not equal to itself.") | |
706 | 706 | } | |
707 | 707 | else throw("Strict value is not equal to itself.") | |
708 | 708 | } | |
709 | 709 | else throw("Strict value is not equal to itself.") | |
710 | 710 | } | |
711 | 711 | else throw("Strict value is not equal to itself.") | |
712 | 712 | } | |
713 | 713 | else nil | |
714 | 714 | if ((putActions == putActions)) | |
715 | 715 | then { | |
716 | 716 | let newPeriod = (period + 1) | |
717 | 717 | let lastPrice = calcPrice(lpAssetId, shareAssetId) | |
718 | 718 | 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) | |
719 | 719 | $Tuple2(actions, toBytes(lastPrice)) | |
720 | 720 | } | |
721 | 721 | else throw("Strict value is not equal to itself.") | |
722 | 722 | } | |
723 | 723 | else throw("Strict value is not equal to itself.") | |
724 | 724 | } | |
725 | 725 | else throw("Strict value is not equal to itself.") | |
726 | 726 | } | |
727 | 727 | else throw("Strict value is not equal to itself.") | |
728 | 728 | } | |
729 | 729 | else throw("Strict value is not equal to itself.") | |
730 | 730 | } | |
731 | 731 | else throw("Strict value is not equal to itself.") | |
732 | 732 | } | |
733 | 733 | else throw("Strict value is not equal to itself.") | |
734 | 734 | } | |
735 | 735 | else throw("Strict value is not equal to itself.") | |
736 | 736 | } | |
737 | 737 | else throw("Strict value is not equal to itself.") | |
738 | 738 | } | |
739 | 739 | ||
740 | 740 | ||
741 | 741 | @Verifier(tx) | |
742 | 742 | func verify () = { | |
743 | 743 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
744 | 744 | case pk: ByteVector => | |
745 | 745 | pk | |
746 | 746 | case _: Unit => | |
747 | 747 | tx.senderPublicKey | |
748 | 748 | case _ => | |
749 | 749 | throw("Match error") | |
750 | 750 | } | |
751 | 751 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
752 | 752 | } | |
753 | 753 |
github/deemru/w8io/169f3d6 84.58 ms ◑