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