tx · 7QoC1hiV52ZP4cNmGRURc8xASNFewmF68ghT4gEpo8cr

3NCroKxpCWCYijwjiVBg6hc2T7DaajrHuBr:  -0.02200000 Waves

2022.10.20 11:14 [2280469] smart account 3NCroKxpCWCYijwjiVBg6hc2T7DaajrHuBr > SELF 0.00000000 Waves

{ "type": 13, "id": "7QoC1hiV52ZP4cNmGRURc8xASNFewmF68ghT4gEpo8cr", "fee": 2200000, "feeAssetId": null, "timestamp": 1666253777391, "version": 1, "sender": "3NCroKxpCWCYijwjiVBg6hc2T7DaajrHuBr", "senderPublicKey": "4j5ighurrUZ2WcdBTRGqBfXs5fz9YDA76D4gtpZ9basj", "proofs": [ "4xeUkhp8t8LTXE1EJJaj72MVLAdvz9nWpfeKtKjHe7b3L3DkSJ7xYThiM23sNwXsa8cp3hkjJGhM5ACT3M81d5oJ" ], "script": "base64:AAIFAAAAAAAACawIAhIDCgEIEgkKBwgICAgBCAgSAwoBARIAEgASBQoDCAgIEgQKAggBEgMKAQgSAwoBCBIAIgNTRVAiBUVNUFRZIg9nZXRTdHJpbmdPckZhaWwiA2tleSIQZ2V0Qm9vbGVhbk9yRmFpbCITa2V5TWFuYWdlclB1YmxpY0tleSIaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkiDmZhaWxFeGVjdXRlR2V0IgNtc2ciDGJhc2VBc3NldFN0ciIOdXNlckFkZHJlc3NTdHIiCmdldFR4SWRTdHIiFmtleUFzc2V0c1N0b3JlQ29udHJhY3QiC2tleUFzc2V0Q2ZnIg9rZXlQcm94eUFkZHJlc3MiB2Fzc2V0SWQiCmtleUJhbGFuY2UiFmtleU5leHRJbnRlcm5hbEFzc2V0SWQiDGtleVByaWNlTGFzdCIVaW50ZXJuYWxCYXNldEFzc2V0U3RyIhJrZXlUb3BVcExhc3RIZWlnaHQiBnNlbmRlciIPa2V5UHJpY2VIaXN0b3J5IgFoIgl0aW1lc3RhbXAiDmtleVRvdGFsTG9ja2VkIhRrZXlUb3RhbExvY2tlZE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2280469, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Wt6wCQ28g8S5P4PkoQ3oDv2EZiFqcSc8DtEVDBBAoj3 Next: HJNhZQNg5ezL4soXxMnfjduCJKqV4KbDVkNp9WXyG9Tw Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let EMPTY = ""
77
88 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
99
1010
1111 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
1212
1313
1414 func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
1515
1616
1717 func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP)
1818
1919
2020 func failExecuteGet (msg,baseAssetStr,userAddressStr,getTxIdStr) = throw(((((((msg + ": baseAssetStr=") + baseAssetStr) + " userAddressStr=") + userAddressStr) + " getTxIdStr=") + getTxIdStr))
2121
2222
2323 func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], SEP)
2424
2525
2626 func keyAssetCfg (baseAssetStr) = ("%s%s%s__config__asset__" + baseAssetStr)
2727
2828
2929 func keyProxyAddress (assetId) = makeString(["%s%s", "proxyAddress", assetId], SEP)
3030
3131
3232 func keyBalance (assetId) = makeString(["%s%s", "balance", assetId], SEP)
3333
3434
3535 func keyNextInternalAssetId () = "%s__nextInternalAssetId"
3636
3737
3838 func keyPriceLast (internalBasetAssetStr) = ("%s%s%d__price__last__" + internalBasetAssetStr)
3939
4040
4141 func keyTopUpLastHeight (internalBasetAssetStr,sender) = makeString(["%s%s%s%d%s__topup__last__height", internalBasetAssetStr, sender], SEP)
4242
4343
4444 func keyPriceHistory (internalBasetAssetStr,h,timestamp) = makeString(["%s%s%d%d%d__price__history", internalBasetAssetStr, toString(h), toString(timestamp)], SEP)
4545
4646
4747 func keyTotalLocked (internalBasetAssetStr) = ("%s%s%d__total__locked__" + internalBasetAssetStr)
4848
4949
5050 func keyTotalLockedByUser (internalBaseAssetStr,userAddressStr) = makeString(["%s%s%d%s__total__locked", internalBaseAssetStr, userAddressStr], SEP)
5151
5252
5353 func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
5454
5555
5656 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
5757
5858
5959 func keyMappingsShare2baseAssetId (shareAssetStr) = ("%s%s%s__mappings__share2baseAssetId__" + shareAssetStr)
6060
6161
6262 func keyMappingsBaseAsset2shareId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2shareId__" + baseAssetStr)
6363
6464
6565 func keyShutdownPutOperation (internalBaseAssetStr) = ("%s%s%d__shutdown__put__" + internalBaseAssetStr)
6666
6767
6868 func keyShutdownManager (internalBaseAssetStr) = ("%s%s%d__shutdown__manager__" + internalBaseAssetStr)
6969
7070
7171 func assetsStoreContract () = addressFromStringValue(value(getString(keyAssetsStoreContract())))
7272
7373
7474 let IdxCfgShareAssetId = 1
7575
7676 let IdxCfgInternalBaseAsset = 2
7777
7878 let IdxCfgDecimalsMultBothAssets = 3
7979
8080 let IdxCfgDecimalsMultPrice = 4
8181
8282 let IdxCfgGetDelayBlocks = 5
8383
8484 func dataAssetCfg (shareAssetStr,internalBaseAssetStr,decimalsMultBothAssets,decimalsMultPrice,getDelayInBlocks) = makeString(["%s%d%d%d%d", shareAssetStr, internalBaseAssetStr, toString(decimalsMultBothAssets), toString(decimalsMultPrice), toString(getDelayInBlocks)], SEP)
8585
8686
8787 let IdxTotalLockedShare = 1
8888
8989 let IdxTotalLockedBase = 2
9090
9191 func dataTotalLocked (shareAssetAmount,baseAssetAmount) = makeString(["%d%d", toString(shareAssetAmount), toString(baseAssetAmount)], SEP)
9292
9393
9494 func readTotalLocked (key) = {
9595 let totalLockedArray = split(valueOrElse(getString(this, key), dataTotalLocked(0, 0)), SEP)
9696 [-1, parseIntValue(totalLockedArray[IdxTotalLockedShare]), parseIntValue(totalLockedArray[IdxTotalLockedBase])]
9797 }
9898
9999
100100 func keyOperation (operationType,internalBaseAssetStr,userAddress,txId) = makeString(["%s%d%s%s", operationType, internalBaseAssetStr, userAddress, txId], SEP)
101101
102102
103103 let IdxOperStatus = 1
104104
105105 let IdxOperInAmount = 2
106106
107107 let IdxOperPrice = 3
108108
109109 let IdxOperOutAmount = 4
110110
111111 let IdxOperStartHeight = 5
112112
113113 let IdxOperStartTimestamp = 6
114114
115115 let IdxOperEndHeight = 7
116116
117117 let IdxOperEndTimestamp = 8
118118
119119 func privateDataOperationAllStrings (status,inAssetAmount,price,outAssetAmount,startHeight,startTimestamp,endHeight,endTimestamp) = makeString(["%s%d%d%d%d%d%d%d", status, inAssetAmount, price, outAssetAmount, startHeight, startTimestamp, endHeight, endTimestamp], SEP)
120120
121121
122122 func dataOperation (status,inAssetAmount,price,outAssetAmount,startHeight,startTimestamp,endHeight,endTimestamp) = privateDataOperationAllStrings(status, toString(inAssetAmount), toString(price), toString(outAssetAmount), toString(startHeight), toString(startTimestamp), toString(endHeight), toString(endTimestamp))
123123
124124
125125 func dataOperationExecutionUpdate (currOperArray,newStatus,newEndTimestamp) = privateDataOperationAllStrings(newStatus, currOperArray[IdxOperInAmount], currOperArray[IdxOperPrice], currOperArray[IdxOperOutAmount], currOperArray[IdxOperStartHeight], currOperArray[IdxOperStartTimestamp], currOperArray[IdxOperEndHeight], toString(newEndTimestamp))
126126
127127
128128 func readAssetCfgOrFail (baseAssetStr) = {
129129 let key = keyAssetCfg(baseAssetStr)
130130 split(getStringOrFail(key), SEP)
131131 }
132132
133133
134134 func incrementTotalLocked (key,shareAssetAmount,baseAssetAmount) = {
135135 let dataArray = readTotalLocked(key)
136136 StringEntry(key, dataTotalLocked((dataArray[IdxTotalLockedShare] + shareAssetAmount), (dataArray[IdxTotalLockedBase] + baseAssetAmount)))
137137 }
138138
139139
140140 func decrementTotalLocked (key,shareAssetAmount,baseAssetAmount) = {
141141 let dataArray = readTotalLocked(key)
142142 StringEntry(key, dataTotalLocked((dataArray[IdxTotalLockedShare] - shareAssetAmount), (dataArray[IdxTotalLockedBase] - baseAssetAmount)))
143143 }
144144
145145
146146 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
147147 case s: String =>
148148 fromBase58String(s)
149149 case _: Unit =>
150150 unit
151151 case _ =>
152152 throw("Match error")
153153 }
154154
155155
156156 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
157157 case s: String =>
158158 fromBase58String(s)
159159 case _: Unit =>
160160 unit
161161 case _ =>
162162 throw("Match error")
163163 }
164164
165165
166166 func balanceOrZero (assetId) = valueOrElse(getInteger(keyBalance(assetId)), 0)
167167
168168
169169 func calcPrice (internalBaseAssetStr,baseAssetId,topUpBaseAmount,shareAssetId,decimalsMultBothAssets,decimalsMultPrice) = {
170170 let totalLockedArray = readTotalLocked(keyTotalLocked(internalBaseAssetStr))
171171 let totalLockedBaseAmount = totalLockedArray[IdxTotalLockedBase]
172172 let baseAssetBalance = balanceOrZero(toBase58String(baseAssetId))
173173 let baseAssetBalanceConsideringLock = (baseAssetBalance + topUpBaseAmount)
174174 if ((0 > baseAssetBalanceConsideringLock))
175175 then throw(((("baseAssetBalanceConsideringLock < 0: baseAssetBalance=" + toString(baseAssetBalance)) + " baseAssetBalanceConsideringLock=") + toString(baseAssetBalanceConsideringLock)))
176176 else {
177177 let shareEmission = value(assetInfo(shareAssetId)).quantity
178178 let price = if ((shareEmission == 0))
179179 then (1 * decimalsMultPrice)
180180 else fraction(baseAssetBalanceConsideringLock, decimalsMultPrice, shareEmission)
181181 $Tuple5(price, baseAssetBalance, totalLockedBaseAmount, baseAssetBalanceConsideringLock, shareEmission)
182182 }
183183 }
184184
185185
186186 func getPrice (internalBaseAssetStr,baseAssetId,shareAssetId,decimalsMultBothAssets,decimalsMultPrice) = {
187187 let totalLockedArray = readTotalLocked(keyTotalLocked(internalBaseAssetStr))
188188 let totalLockedBaseAmount = totalLockedArray[IdxTotalLockedBase]
189189 let baseAssetBalance = balanceOrZero(toBase58String(baseAssetId))
190190 let baseAssetBalanceConsideringLock = baseAssetBalance
191191 let shareEmission = value(assetInfo(shareAssetId)).quantity
192192 let price = value(getInteger(keyPriceLast(internalBaseAssetStr)))
193193 $Tuple5(price, baseAssetBalance, totalLockedBaseAmount, baseAssetBalanceConsideringLock, shareEmission)
194194 }
195195
196196
197197 func privateCurrentSysParamsREST (baseAssetStr) = {
198198 let baseAssetId = fromBase58String(baseAssetStr)
199199 let cfgArray = readAssetCfgOrFail(baseAssetStr)
200200 let shareAssetStr = cfgArray[IdxCfgShareAssetId]
201201 let shareAssetId = fromBase58String(shareAssetStr)
202202 let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets])
203203 let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice])
204204 let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset]
205205 let sysState = getPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)
206206 let topUpLastHeight = match getInteger(keyTopUpLastHeight(internalBaseAssetStr, getStringValue(keyProxyAddress(baseAssetStr)))) {
207207 case h: Int =>
208208 value(h)
209209 case _: Unit =>
210210 getIntegerValue(keyTopUpLastHeight(internalBaseAssetStr, toString(addressFromPublicKey(fromBase58String(getStringValue(keyManagerPublicKey()))))))
211211 case _ =>
212212 throw("undefined behaviour in privateCurrentSysParamsREST match")
213213 }
214214 $Tuple8(IntegerEntry("price", sysState._1), IntegerEntry("decimalsMultPrice", decimalsMultPrice), IntegerEntry("baseAssetBalance", sysState._2), IntegerEntry("totalLockedBaseAmount", sysState._3), IntegerEntry("baseAssetBalanceConsideringLock", sysState._4), IntegerEntry("shareEmission", sysState._5), IntegerEntry("baseAssetDecimals", value(assetInfo(baseAssetId)).decimals), IntegerEntry("lastTopUpTimestamp", value(blockInfoByHeight(topUpLastHeight)).timestamp))
215215 }
216216
217217
218218 func mustManager (i) = {
219219 let pd = throw("permission denied")
220220 match managerPublicKeyOrUnit() {
221221 case pk: ByteVector =>
222222 if ((i.callerPublicKey == pk))
223223 then true
224224 else pd
225225 case _: Unit =>
226226 if ((i.caller == this))
227227 then true
228228 else pd
229229 case _ =>
230230 throw("Match error")
231231 }
232232 }
233233
234234
235235 func mustProxyAddress (i,assetId) = {
236236 let isProxy = (toString(i.caller) == valueOrElse(getString(keyProxyAddress(assetId)), EMPTY))
237237 if (isProxy)
238238 then true
239239 else {
240240 let checkCaller = mustManager(i)
241241 if ((checkCaller == checkCaller))
242242 then true
243243 else throw("Strict value is not equal to itself.")
244244 }
245245 }
246246
247247
248248 @Callable(i)
249249 func constructor (assetsStoreContract) = {
250250 let checkCaller = mustManager(i)
251251 if ((checkCaller == checkCaller))
252252 then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)]
253253 else throw("Strict value is not equal to itself.")
254254 }
255255
256256
257257
258258 @Callable(i)
259259 func adminRegisterAsset (baseAssetStr,shareAssetName,shareAssetDescr,shareAssetLogo,getDelayinBlocks,shutdownManagerAddress,proxyAddress) = {
260260 let baseAssetId = fromBase58String(baseAssetStr)
261261 let decimals = value(assetInfo(baseAssetId)).decimals
262262 let check = mustManager(i)
263263 if ((check == check))
264264 then if ((toString(addressFromStringValue(shutdownManagerAddress)) != shutdownManagerAddress))
265265 then throw("invalid shutdownManagerAddress")
266266 else if ((0 > getDelayinBlocks))
267267 then throw(("invalid getDelayinBlocks=" + toString(getDelayinBlocks)))
268268 else {
269269 let shareAssetIssueAction = Issue(shareAssetName, shareAssetDescr, 1, decimals, true)
270270 let shareAssetId = calculateAssetId(shareAssetIssueAction)
271271 let shareAssetStr = toBase58String(shareAssetId)
272272 let decimalsMultPrice = ((100 * 1000) * 1000)
273273 let decimalsMultBothAssets = pow(10, 0, decimals, 0, 0, DOWN)
274274 let startPrice = (1 * decimalsMultPrice)
275275 let internalBaseAssettId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
276276 let internalBaseAssetStr = toString(internalBaseAssettId)
277277 let createOrUpdate = invoke(assetsStoreContract(), "createOrUpdate", [shareAssetStr, shareAssetLogo, false], nil)
278278 if ((createOrUpdate == createOrUpdate))
279279 then {
280280 let addLabel = invoke(assetsStoreContract(), "addLabel", [shareAssetStr, "STAKING_LP"], nil)
281281 if ((addLabel == addLabel))
282282 then [StringEntry(keyAssetCfg(baseAssetStr), dataAssetCfg(shareAssetStr, internalBaseAssetStr, decimalsMultBothAssets, decimalsMultPrice, getDelayinBlocks)), StringEntry(keyMappingsInternal2baseAssetId(internalBaseAssettId), baseAssetStr), StringEntry(keyMappingsBaseAsset2internalId(baseAssetStr), internalBaseAssetStr), StringEntry(keyMappingsShare2baseAssetId(shareAssetStr), baseAssetStr), StringEntry(keyMappingsBaseAsset2shareId(baseAssetStr), shareAssetStr), BooleanEntry(keyShutdownPutOperation(internalBaseAssetStr), false), StringEntry(keyShutdownManager(internalBaseAssetStr), shutdownManagerAddress), IntegerEntry(keyNextInternalAssetId(), (internalBaseAssettId + 1)), IntegerEntry(keyPriceLast(internalBaseAssetStr), startPrice), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), startPrice), shareAssetIssueAction, Burn(shareAssetId, 1), StringEntry(keyProxyAddress(baseAssetStr), proxyAddress)]
283283 else throw("Strict value is not equal to itself.")
284284 }
285285 else throw("Strict value is not equal to itself.")
286286 }
287287 else throw("Strict value is not equal to itself.")
288288 }
289289
290290
291291
292292 @Callable(i)
293293 func shutdownPut (internalBaseAssetId) = {
294294 let internalBaseAssetIdStr = toString(internalBaseAssetId)
295295 let baseAssetIdStr = getStringOrFail(keyMappingsInternal2baseAssetId(internalBaseAssetId))
296296 let shutdownManagerAddress = getStringOrFail(keyShutdownManager(internalBaseAssetIdStr))
297297 if ((1 > size(baseAssetIdStr)))
298298 then throw("invalid internalBaseAssetId")
299299 else if ((toString(i.caller) != shutdownManagerAddress))
300300 then throw("access denied")
301301 else [BooleanEntry(keyShutdownPutOperation(toString(internalBaseAssetId)), true)]
302302 }
303303
304304
305305
306306 @Callable(i)
307307 func put () = {
308308 let pmt = value(i.payments[0])
309309 let baseAssetId = value(pmt.assetId)
310310 let baseAssetStr = toBase58String(baseAssetId)
311311 let userAddressStr = toString(i.caller)
312312 let cfgArray = readAssetCfgOrFail(baseAssetStr)
313313 let shareAssetStr = cfgArray[IdxCfgShareAssetId]
314314 let shareAssetId = fromBase58String(shareAssetStr)
315315 let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets])
316316 let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice])
317317 let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset]
318318 let isPutBlocked = getBooleanOrFail(keyShutdownPutOperation(internalBaseAssetStr))
319319 if (isPutBlocked)
320320 then throw("put operation is blocked")
321321 else {
322322 let newBalance = (balanceOrZero(baseAssetStr) + pmt.amount)
323323 let price = getPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1
324324 let shareAssetAmount = fraction(pmt.amount, decimalsMultPrice, price, CEILING)
325325 [Reissue(shareAssetId, shareAssetAmount, true), ScriptTransfer(i.caller, shareAssetAmount, shareAssetId), StringEntry(keyOperation("P", internalBaseAssetStr, userAddressStr, toBase58String(i.transactionId)), dataOperation("FINISHED", pmt.amount, price, shareAssetAmount, height, lastBlock.timestamp, height, lastBlock.timestamp)), ScriptTransfer(addressFromStringValue(value(getString(keyProxyAddress(baseAssetStr)))), pmt.amount, baseAssetId), IntegerEntry(keyBalance(baseAssetStr), newBalance)]
326326 }
327327 }
328328
329329
330330
331331 @Callable(i)
332332 func submitGetRequest () = {
333333 let pmt = value(i.payments[0])
334334 let shareAssetId = value(pmt.assetId)
335335 let shareAssetStr = toBase58String(shareAssetId)
336336 let callerPubStr = toBase58String(i.callerPublicKey)
337337 let userAddress = i.caller
338338 let userAddressStr = toString(userAddress)
339339 let shareAssetAmount = pmt.amount
340340 let baseAssetStr = getStringOrFail(keyMappingsShare2baseAssetId(shareAssetStr))
341341 let baseAssetId = fromBase58String(baseAssetStr)
342342 let cfgArray = readAssetCfgOrFail(baseAssetStr)
343343 let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets])
344344 let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice])
345345 let getDelayBlocks = parseIntValue(cfgArray[IdxCfgGetDelayBlocks])
346346 let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset]
347347 let price = getPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1
348348 let baseAssetAmount = fraction(shareAssetAmount, price, decimalsMultPrice)
349349 let operationKey = keyOperation("G", internalBaseAssetStr, userAddressStr, toBase58String(i.transactionId))
350350 let operationData = dataOperation("PENDING", shareAssetAmount, price, baseAssetAmount, height, lastBlock.timestamp, (height + getDelayBlocks), 0)
351351 [Burn(shareAssetId, shareAssetAmount), StringEntry(operationKey, operationData), incrementTotalLocked(keyTotalLocked(internalBaseAssetStr), shareAssetAmount, baseAssetAmount), incrementTotalLocked(keyTotalLockedByUser(internalBaseAssetStr, userAddressStr), shareAssetAmount, baseAssetAmount), IntegerEntry(keyBalance(baseAssetStr), (balanceOrZero(baseAssetStr) - baseAssetAmount))]
352352 }
353353
354354
355355
356356 @Callable(i)
357357 func executeGetRequest (baseAssetStr,userAddressStr,getTxIdStr) = {
358358 let userAddress = addressFromStringValue(userAddressStr)
359359 let assetCfgArray = readAssetCfgOrFail(baseAssetStr)
360360 let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId])
361361 let baseAssetId = fromBase58String(baseAssetStr)
362362 let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset]
363363 let operationKey = keyOperation("G", internalBaseAssetStr, userAddressStr, getTxIdStr)
364364 let operationArray = split(getStringOrFail(operationKey), SEP)
365365 let status = operationArray[IdxOperStatus]
366366 let endHeight = parseIntValue(operationArray[IdxOperEndHeight])
367367 let inShareAmount = parseIntValue(operationArray[IdxOperInAmount])
368368 let outBaseAmount = parseIntValue(operationArray[IdxOperOutAmount])
369369 if ((status != "PENDING"))
370370 then failExecuteGet("Status is not PENDING", baseAssetStr, userAddressStr, getTxIdStr)
371371 else if ((endHeight > height))
372372 then failExecuteGet(((("EndHeight[" + toString(endHeight)) + "] > ") + toString(height)), baseAssetStr, userAddressStr, getTxIdStr)
373373 else [ScriptTransfer(userAddress, outBaseAmount, baseAssetId), StringEntry(operationKey, dataOperationExecutionUpdate(operationArray, "FINISHED", lastBlock.timestamp)), decrementTotalLocked(keyTotalLocked(internalBaseAssetStr), inShareAmount, outBaseAmount), decrementTotalLocked(keyTotalLockedByUser(internalBaseAssetStr, userAddressStr), inShareAmount, outBaseAmount)]
374374 }
375375
376376
377377
378378 @Callable(i)
379379 func topUpBalance (baseAssetStr,delta) = {
380380 let assetCfgArray = readAssetCfgOrFail(baseAssetStr)
381381 let pmt = value(i.payments[0])
382382 let pmtAssetId = value(pmt.assetId)
383383 let pmtAssetStr = toBase58String(pmtAssetId)
384384 let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId])
385385 let decimalsMultBothAssets = parseIntValue(assetCfgArray[IdxCfgDecimalsMultBothAssets])
386386 let decimalsMultPrice = parseIntValue(assetCfgArray[IdxCfgDecimalsMultPrice])
387387 let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset]
388388 let topUpLastHeightKEY = keyTopUpLastHeight(internalBaseAssetStr, toString(i.caller))
389389 let topUpLastHeight = valueOrElse(getInteger(this, topUpLastHeightKEY), 0)
390390 let checks = [mustProxyAddress(i, baseAssetStr), if ((topUpLastHeight != height))
391391 then true
392392 else throw("only one topUp per block is allowed"), if ((delta > 0))
393393 then true
394394 else throw("only positive delta is allowed")]
395395 if ((checks == checks))
396396 then if ((baseAssetStr != pmtAssetStr))
397397 then throw("attached payment's asset id is NOT matched passed baseAssetStr")
398398 else if ((size(i.payments) > 1))
399399 then throw("only one payment can be attached")
400400 else {
401401 let price = calcPrice(internalBaseAssetStr, pmtAssetId, delta, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1
402402 [IntegerEntry(keyPriceLast(internalBaseAssetStr), price), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), price), IntegerEntry(topUpLastHeightKEY, height), IntegerEntry(keyBalance(pmtAssetStr), (balanceOrZero(pmtAssetStr) + delta))]
403403 }
404404 else throw("Strict value is not equal to itself.")
405405 }
406406
407407
408408
409409 @Callable(i)
410410 func currentSysParamsREST (baseAssetStr) = {
411411 let sysStateTuple = privateCurrentSysParamsREST(baseAssetStr)
412412 let price = sysStateTuple._1.value
413413 let decimalsMultPrice = sysStateTuple._2.value
414414 let baseAssetBalance = sysStateTuple._3.value
415415 let totalLockedBaseAmount = sysStateTuple._4.value
416416 let baseAssetBalanceConsideringLock = sysStateTuple._5.value
417417 let shareEmission = sysStateTuple._6.value
418418 let restData = makeString(["startCurrentSysParamsREST", toString(price), toString(decimalsMultPrice), toString(baseAssetBalance), toString(totalLockedBaseAmount), toString(baseAssetBalanceConsideringLock), toString(shareEmission), "endCurrentSysParamsREST"], SEP)
419419 throw(restData)
420420 }
421421
422422
423423
424424 @Callable(i)
425425 func setManager (pendingManagerPublicKey) = {
426426 let checkCaller = mustManager(i)
427427 if ((checkCaller == checkCaller))
428428 then {
429429 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
430430 if ((checkManagerPublicKey == checkManagerPublicKey))
431431 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
432432 else throw("Strict value is not equal to itself.")
433433 }
434434 else throw("Strict value is not equal to itself.")
435435 }
436436
437437
438438
439439 @Callable(i)
440440 func confirmManager () = {
441441 let pm = pendingManagerPublicKeyOrUnit()
442442 let hasPM = if (isDefined(pm))
443443 then true
444444 else throw("no pending manager")
445445 if ((hasPM == hasPM))
446446 then {
447447 let checkPM = if ((i.callerPublicKey == value(pm)))
448448 then true
449449 else throw("you are not pending manager")
450450 if ((checkPM == checkPM))
451451 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
452452 else throw("Strict value is not equal to itself.")
453453 }
454454 else throw("Strict value is not equal to itself.")
455455 }
456456
457457
458458 @Verifier(tx)
459459 func verify () = {
460460 let targetPublicKey = match managerPublicKeyOrUnit() {
461461 case pk: ByteVector =>
462462 pk
463463 case _: Unit =>
464464 tx.senderPublicKey
465465 case _ =>
466466 throw("Match error")
467467 }
468468 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
469469 }
470470

github/deemru/w8io/fabc49c 
55.41 ms