tx · DKxyAgX2ubtyYE6nAwvpw2t3JdQmVy9x36YuCS9W2mWy

3Mzt645zA6u2QG6jRPoo6H6CK89kVggFgNi:  -0.02500000 Waves

2022.06.07 15:34 [2085952] smart account 3Mzt645zA6u2QG6jRPoo6H6CK89kVggFgNi > SELF 0.00000000 Waves

{ "type": 13, "id": "DKxyAgX2ubtyYE6nAwvpw2t3JdQmVy9x36YuCS9W2mWy", "fee": 2500000, "feeAssetId": null, "timestamp": 1654605370791, "version": 1, "sender": "3Mzt645zA6u2QG6jRPoo6H6CK89kVggFgNi", "senderPublicKey": "7uejFa4bRSfBcedNiZpvC7nH9dnudVtejqqd8Rq4o8Ay", "proofs": [ "21UyqyvvEXBVZ4SUShdiDyB1275MfzW5oqMwca7GMbyNLrSNtjN1agWiqq3g2SMHYGYWjcG94A4qUXsGVb2o7dgn" ], "script": "base64:AAIFAAAAAAAAACwIAhIHCgUICAgBCBIDCgEBEgASABIFCgMICAgSAwoBCBIDCgEIEgMKAQgSAAAAADIAAAAAA1NFUAIAAAACX18BAAAAD2dldFN0cmluZ09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5CQABLAAAAAICAAAAFU5vIGRhdGEgZm9yIHRoaXMua2V5PQUAAAADa2V5AQAAABBnZXRCb29sZWFuT3JGYWlsAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkJAAEsAAAAAgIAAAAVTm8gZGF0YSBmb3IgdGhpcy5rZXk9BQAAAANrZXkBAAAADmZhaWxFeGVjdXRlR2V0AAAABAAAAANtc2cAAAAMYmFzZUFzc2V0U3RyAAAADnVzZXJBZGRyZXNzU3RyAAAACmdldFR4SWRTdHIJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgU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ACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleQUkYhs=", "chainId": 84, "height": 2085952, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 65remLvToC36SH7VaK6p9MCsrzbBAgEb247SjKueYXQg Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let SEP = "__"
5+
6+func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
7+
8+
9+func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
10+
11+
12+func failExecuteGet (msg,baseAssetStr,userAddressStr,getTxIdStr) = throw(((((((msg + ": baseAssetStr=") + baseAssetStr) + " userAddressStr=") + userAddressStr) + " getTxIdStr=") + getTxIdStr))
13+
14+
15+func keyAssetCfg (baseAssetStr) = ("%s%s%s__config__asset__" + baseAssetStr)
16+
17+
18+func keyNextInternalAssetId () = "%s__nextInternalAssetId"
19+
20+
21+func keyPriceLast (internalBasetAssetStr) = ("%s%s%d__price__last__" + internalBasetAssetStr)
22+
23+
24+func keyTopUpLastHeight (internalBasetAssetStr,sender) = makeString(["%s%s%s%d%s__topup__last__height", internalBasetAssetStr, sender], SEP)
25+
26+
27+func keyPriceHistory (internalBasetAssetStr,h,timestamp) = makeString(["%s%s%d%d%d__price__history", internalBasetAssetStr, toString(h), toString(timestamp)], SEP)
28+
29+
30+func keyTotalLocked (internalBasetAssetStr) = ("%s%s%d__total__locked__" + internalBasetAssetStr)
31+
32+
33+func keyTotalLockedByUser (internalBaseAssetStr,userAddressStr) = makeString(["%s%s%d%s__total__locked", internalBaseAssetStr, userAddressStr], SEP)
34+
35+
36+func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
37+
38+
39+func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
40+
41+
42+func keyMappingsShare2baseAssetId (shareAssetStr) = ("%s%s%s__mappings__share2baseAssetId__" + shareAssetStr)
43+
44+
45+func keyMappingsBaseAsset2shareId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2shareId__" + baseAssetStr)
46+
47+
48+func keyShutdownPutOperation (internalBaseAssetStr) = ("%s%s%d__shutdown__put__" + internalBaseAssetStr)
49+
50+
51+func keyShutdownManager (internalBaseAssetStr) = ("%s%s%d__shutdown__manager__" + internalBaseAssetStr)
52+
53+
54+func keyManagerPublicKey () = "%s__managerPublicKey"
55+
56+
57+func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
58+
59+
60+let IdxCfgShareAssetId = 1
61+
62+let IdxCfgInternalBaseAsset = 2
63+
64+let IdxCfgDecimalsMultBothAssets = 3
65+
66+let IdxCfgDecimalsMultPrice = 4
67+
68+let IdxCfgGetDelayBlocks = 5
69+
70+func dataAssetCfg (shareAssetStr,internalBaseAssetStr,decimalsMultBothAssets,decimalsMultPrice,getDelayInBlocks) = makeString(["%s%d%d%d%d", shareAssetStr, internalBaseAssetStr, toString(decimalsMultBothAssets), toString(decimalsMultPrice), toString(getDelayInBlocks)], SEP)
71+
72+
73+let IdxTotalLockedShare = 1
74+
75+let IdxTotalLockedBase = 2
76+
77+func dataTotalLocked (shareAssetAmount,baseAssetAmount) = makeString(["%d%d", toString(shareAssetAmount), toString(baseAssetAmount)], SEP)
78+
79+
80+func readTotalLocked (key) = {
81+ let totalLockedArray = split(valueOrElse(getString(this, key), dataTotalLocked(0, 0)), SEP)
82+[-1, parseIntValue(totalLockedArray[IdxTotalLockedShare]), parseIntValue(totalLockedArray[IdxTotalLockedBase])]
83+ }
84+
85+
86+func keyOperation (operationType,internalBaseAssetStr,userAddress,txId) = makeString(["%s%d%s%s", operationType, internalBaseAssetStr, userAddress, txId], SEP)
87+
88+
89+let IdxOperStatus = 1
90+
91+let IdxOperInAmount = 2
92+
93+let IdxOperPrice = 3
94+
95+let IdxOperOutAmount = 4
96+
97+let IdxOperStartHeight = 5
98+
99+let IdxOperStartTimestamp = 6
100+
101+let IdxOperEndHeight = 7
102+
103+let IdxOperEndTimestamp = 8
104+
105+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)
106+
107+
108+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))
109+
110+
111+func dataOperationExecutionUpdate (currOperArray,newStatus,newEndTimestamp) = privateDataOperationAllStrings(newStatus, currOperArray[IdxOperInAmount], currOperArray[IdxOperPrice], currOperArray[IdxOperOutAmount], currOperArray[IdxOperStartHeight], currOperArray[IdxOperStartTimestamp], currOperArray[IdxOperEndHeight], toString(newEndTimestamp))
112+
113+
114+func readAssetCfgOrFail (baseAssetStr) = {
115+ let key = keyAssetCfg(baseAssetStr)
116+ split(getStringOrFail(key), SEP)
117+ }
118+
119+
120+func incrementTotalLocked (key,shareAssetAmount,baseAssetAmount) = {
121+ let dataArray = readTotalLocked(key)
122+ StringEntry(key, dataTotalLocked((dataArray[IdxTotalLockedShare] + shareAssetAmount), (dataArray[IdxTotalLockedBase] + baseAssetAmount)))
123+ }
124+
125+
126+func decrementTotalLocked (key,shareAssetAmount,baseAssetAmount) = {
127+ let dataArray = readTotalLocked(key)
128+ StringEntry(key, dataTotalLocked((dataArray[IdxTotalLockedShare] - shareAssetAmount), (dataArray[IdxTotalLockedBase] - baseAssetAmount)))
129+ }
130+
131+
132+func genericCalcPrice (internalBaseAssetStr,baseAssetId,topUpBaseAmount,shareAssetId,decimalsMultBothAssets,decimalsMultPrice) = {
133+ let totalLockedArray = readTotalLocked(keyTotalLocked(internalBaseAssetStr))
134+ let totalLockedBaseAmount = totalLockedArray[IdxTotalLockedBase]
135+ let baseAssetBalance = assetBalance(this, baseAssetId)
136+ let baseAssetBalanceConsideringLock = ((baseAssetBalance - totalLockedBaseAmount) + topUpBaseAmount)
137+ if ((0 > baseAssetBalanceConsideringLock))
138+ then throw(((("baseAssetBalanceConsideringLock < 0: baseAssetBalance=" + toString(baseAssetBalance)) + " baseAssetBalanceConsideringLock=") + toString(baseAssetBalanceConsideringLock)))
139+ else {
140+ let shareEmission = value(assetInfo(shareAssetId)).quantity
141+ let price = if ((shareEmission == 0))
142+ then (1 * decimalsMultPrice)
143+ else fraction(baseAssetBalanceConsideringLock, decimalsMultPrice, shareEmission)
144+ $Tuple5(price, baseAssetBalance, totalLockedBaseAmount, baseAssetBalanceConsideringLock, shareEmission)
145+ }
146+ }
147+
148+
149+func calcPrice (internalBaseAssetStr,baseAssetId,shareAssetId,decimalsMultBothAssets,decimalsMultPrice) = genericCalcPrice(internalBaseAssetStr, baseAssetId, 0, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)
150+
151+
152+func privateCurrentSysParamsREST (baseAssetStr) = {
153+ let baseAssetId = fromBase58String(baseAssetStr)
154+ let cfgArray = readAssetCfgOrFail(baseAssetStr)
155+ let shareAssetStr = cfgArray[IdxCfgShareAssetId]
156+ let shareAssetId = fromBase58String(shareAssetStr)
157+ let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets])
158+ let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice])
159+ let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset]
160+ let sysState = calcPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)
161+ $Tuple6(IntegerEntry("price", sysState._1), IntegerEntry("decimalsMultPrice", decimalsMultPrice), IntegerEntry("baseAssetBalance", sysState._2), IntegerEntry("totalLockedBaseAmount", sysState._3), IntegerEntry("baseAssetBalanceConsideringLock", sysState._4), IntegerEntry("shareEmission", sysState._5))
162+ }
163+
164+
165+func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
166+ case s: String =>
167+ fromBase58String(s)
168+ case _: Unit =>
169+ unit
170+ case _ =>
171+ throw("Match error")
172+}
173+
174+
175+func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
176+ case s: String =>
177+ fromBase58String(s)
178+ case _: Unit =>
179+ unit
180+ case _ =>
181+ throw("Match error")
182+}
183+
184+
185+func mustManager (i) = {
186+ let pd = throw("Permission denied")
187+ match managerPublicKeyOrUnit() {
188+ case pk: ByteVector =>
189+ if ((i.callerPublicKey == pk))
190+ then true
191+ else pd
192+ case _: Unit =>
193+ if ((i.caller == this))
194+ then true
195+ else pd
196+ case _ =>
197+ throw("Match error")
198+ }
199+ }
200+
201+
202+@Callable(i)
203+func adminRegisterAsset (baseAssetStr,shareAssetName,shareAssetDescr,getDelayinBlocks,shutdownManagerAddress) = {
204+ let baseAssetId = fromBase58String(baseAssetStr)
205+ let decimals = value(assetInfo(baseAssetId)).decimals
206+ if ((i.caller != this))
207+ then throw("permissions denied")
208+ else if ((toString(addressFromStringValue(shutdownManagerAddress)) != shutdownManagerAddress))
209+ then throw("invalid shutdownManagerAddress")
210+ else if ((0 > getDelayinBlocks))
211+ then throw(("invalid getDelayinBlocks=" + toString(getDelayinBlocks)))
212+ else {
213+ let shareAssetIssueAction = Issue(shareAssetName, shareAssetDescr, 1, decimals, true)
214+ let shareAssetId = calculateAssetId(shareAssetIssueAction)
215+ let shareAssetStr = toBase58String(shareAssetId)
216+ let decimalsMultPrice = ((100 * 1000) * 1000)
217+ let decimalsMultBothAssets = pow(10, 0, decimals, 0, 0, DOWN)
218+ let startPrice = (1 * decimalsMultPrice)
219+ let internalBaseAssettId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
220+ let internalBaseAssetStr = toString(internalBaseAssettId)
221+[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)]
222+ }
223+ }
224+
225+
226+
227+@Callable(i)
228+func shutdownPut (internalBaseAssetId) = {
229+ let internalBaseAssetIdStr = toString(internalBaseAssetId)
230+ let baseAssetIdStr = getStringOrFail(keyMappingsInternal2baseAssetId(internalBaseAssetId))
231+ let shutdownManagerAddress = getStringOrFail(keyShutdownManager(internalBaseAssetIdStr))
232+ if ((1 > size(baseAssetIdStr)))
233+ then throw("invalid internalBaseAssetId")
234+ else if ((toString(i.caller) != shutdownManagerAddress))
235+ then throw("access denied")
236+ else [BooleanEntry(keyShutdownPutOperation(toString(internalBaseAssetId)), true)]
237+ }
238+
239+
240+
241+@Callable(i)
242+func put () = {
243+ let pmt = value(i.payments[0])
244+ let baseAssetId = value(pmt.assetId)
245+ let baseAssetStr = toBase58String(baseAssetId)
246+ let userAddressStr = toString(i.caller)
247+ let cfgArray = readAssetCfgOrFail(baseAssetStr)
248+ let shareAssetStr = cfgArray[IdxCfgShareAssetId]
249+ let shareAssetId = fromBase58String(shareAssetStr)
250+ let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets])
251+ let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice])
252+ let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset]
253+ let isPutBlocked = getBooleanOrFail(keyShutdownPutOperation(internalBaseAssetStr))
254+ if (isPutBlocked)
255+ then throw("put operation is blocked")
256+ else {
257+ let price = calcPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1
258+ let shareAssetAmount = fraction(pmt.amount, decimalsMultPrice, price)
259+[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))]
260+ }
261+ }
262+
263+
264+
265+@Callable(i)
266+func submitGetRequest () = {
267+ let pmt = value(i.payments[0])
268+ let shareAssetId = value(pmt.assetId)
269+ let shareAssetStr = toBase58String(shareAssetId)
270+ let callerPubStr = toBase58String(i.callerPublicKey)
271+ let userAddress = i.caller
272+ let userAddressStr = toString(userAddress)
273+ let shareAssetAmount = pmt.amount
274+ let baseAssetStr = getStringOrFail(keyMappingsShare2baseAssetId(shareAssetStr))
275+ let baseAssetId = fromBase58String(baseAssetStr)
276+ let cfgArray = readAssetCfgOrFail(baseAssetStr)
277+ let decimalsMultBothAssets = parseIntValue(cfgArray[IdxCfgDecimalsMultBothAssets])
278+ let decimalsMultPrice = parseIntValue(cfgArray[IdxCfgDecimalsMultPrice])
279+ let getDelayBlocks = parseIntValue(cfgArray[IdxCfgGetDelayBlocks])
280+ let internalBaseAssetStr = cfgArray[IdxCfgInternalBaseAsset]
281+ let price = calcPrice(internalBaseAssetStr, baseAssetId, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1
282+ let baseAssetAmount = fraction(shareAssetAmount, price, decimalsMultPrice)
283+ let operationKey = keyOperation("G", internalBaseAssetStr, userAddressStr, toBase58String(i.transactionId))
284+ let operationData = dataOperation("PENDING", shareAssetAmount, price, baseAssetAmount, height, lastBlock.timestamp, (height + getDelayBlocks), 0)
285+[Burn(shareAssetId, shareAssetAmount), StringEntry(operationKey, operationData), incrementTotalLocked(keyTotalLocked(internalBaseAssetStr), shareAssetAmount, baseAssetAmount), incrementTotalLocked(keyTotalLockedByUser(internalBaseAssetStr, userAddressStr), shareAssetAmount, baseAssetAmount)]
286+ }
287+
288+
289+
290+@Callable(i)
291+func executeGetRequest (baseAssetStr,userAddressStr,getTxIdStr) = {
292+ let userAddress = addressFromStringValue(userAddressStr)
293+ let assetCfgArray = readAssetCfgOrFail(baseAssetStr)
294+ let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId])
295+ let baseAssetId = fromBase58String(baseAssetStr)
296+ let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset]
297+ let operationKey = keyOperation("G", internalBaseAssetStr, userAddressStr, getTxIdStr)
298+ let operationArray = split(getStringOrFail(operationKey), SEP)
299+ let status = operationArray[IdxOperStatus]
300+ let endHeight = parseIntValue(operationArray[IdxOperEndHeight])
301+ let inShareAmount = parseIntValue(operationArray[IdxOperInAmount])
302+ let outBaseAmount = parseIntValue(operationArray[IdxOperOutAmount])
303+ if ((status != "PENDING"))
304+ then failExecuteGet("Status is not PENDING", baseAssetStr, userAddressStr, getTxIdStr)
305+ else if ((endHeight > height))
306+ then failExecuteGet(((("EndHeight[" + toString(endHeight)) + "] > ") + toString(height)), baseAssetStr, userAddressStr, getTxIdStr)
307+ else [ScriptTransfer(userAddress, outBaseAmount, baseAssetId), StringEntry(operationKey, dataOperationExecutionUpdate(operationArray, "FINISHED", lastBlock.timestamp)), decrementTotalLocked(keyTotalLocked(internalBaseAssetStr), inShareAmount, outBaseAmount), decrementTotalLocked(keyTotalLockedByUser(internalBaseAssetStr, userAddressStr), inShareAmount, outBaseAmount)]
308+ }
309+
310+
311+
312+@Callable(i)
313+func topUpBalance (baseAssetStr) = {
314+ let assetCfgArray = readAssetCfgOrFail(baseAssetStr)
315+ let pmt = value(i.payments[0])
316+ let pmtAssetId = value(pmt.assetId)
317+ let pmtAssetStr = toBase58String(pmtAssetId)
318+ let shareAssetId = fromBase58String(assetCfgArray[IdxCfgShareAssetId])
319+ let decimalsMultBothAssets = parseIntValue(assetCfgArray[IdxCfgDecimalsMultBothAssets])
320+ let decimalsMultPrice = parseIntValue(assetCfgArray[IdxCfgDecimalsMultPrice])
321+ let internalBaseAssetStr = assetCfgArray[IdxCfgInternalBaseAsset]
322+ let topUpLastHeightKEY = keyTopUpLastHeight(internalBaseAssetStr, toString(i.caller))
323+ let topUpLastHeight = valueOrElse(getInteger(this, topUpLastHeightKEY), 0)
324+ if ((baseAssetStr != pmtAssetStr))
325+ then throw("attached payment's asset id is NOT matched passed baseAssetStr")
326+ else if ((size(i.payments) > 1))
327+ then throw("only one payment can be attached")
328+ else if ((100 > (height - topUpLastHeight)))
329+ then throw("1 topUp per 100 blocks from the same address is allowed")
330+ else {
331+ let price = genericCalcPrice(internalBaseAssetStr, pmtAssetId, pmt.amount, shareAssetId, decimalsMultBothAssets, decimalsMultPrice)._1
332+[IntegerEntry(keyPriceLast(internalBaseAssetStr), price), IntegerEntry(keyPriceHistory(internalBaseAssetStr, height, lastBlock.timestamp), price), IntegerEntry(topUpLastHeightKEY, height)]
333+ }
334+ }
335+
336+
337+
338+@Callable(i)
339+func currentSysParamsREST (baseAssetStr) = {
340+ let sysStateTuple = privateCurrentSysParamsREST(baseAssetStr)
341+ let price = sysStateTuple._1.value
342+ let decimalsMultPrice = sysStateTuple._2.value
343+ let baseAssetBalance = sysStateTuple._3.value
344+ let totalLockedBaseAmount = sysStateTuple._4.value
345+ let baseAssetBalanceConsideringLock = sysStateTuple._5.value
346+ let shareEmission = sysStateTuple._6.value
347+ let restData = makeString(["startCurrentSysParamsREST", toString(price), toString(decimalsMultPrice), toString(baseAssetBalance), toString(totalLockedBaseAmount), toString(baseAssetBalanceConsideringLock), toString(shareEmission), "endCurrentSysParamsREST"], SEP)
348+ throw(restData)
349+ }
350+
351+
352+
353+@Callable(i)
354+func setManager (pendingManagerPublicKey) = {
355+ let checkCaller = mustManager(i)
356+ if ((checkCaller == checkCaller))
357+ then {
358+ let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
359+ if ((checkManagerPublicKey == checkManagerPublicKey))
360+ then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
361+ else throw("Strict value is not equal to itself.")
362+ }
363+ else throw("Strict value is not equal to itself.")
364+ }
365+
366+
367+
368+@Callable(i)
369+func confirmManager () = {
370+ let pm = pendingManagerPublicKeyOrUnit()
371+ let hasPM = if (isDefined(pm))
372+ then true
373+ else throw("No pending manager")
374+ if ((hasPM == hasPM))
375+ then {
376+ let checkPM = if ((i.callerPublicKey == value(pm)))
377+ then true
378+ else throw("You are not pending manager")
379+ if ((checkPM == checkPM))
380+ then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
381+ else throw("Strict value is not equal to itself.")
382+ }
383+ else throw("Strict value is not equal to itself.")
384+ }
385+
386+
387+@Verifier(tx)
388+func verify () = {
389+ let targetPublicKey = match managerPublicKeyOrUnit() {
390+ case pk: ByteVector =>
391+ pk
392+ case _: Unit =>
393+ tx.senderPublicKey
394+ case _ =>
395+ throw("Match error")
396+ }
397+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
398+ }
399+

github/deemru/w8io/026f985 
53.07 ms