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