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