tx · T8qZPUstRzW3yfUS6qjcejZC78eSAJQxHoXTsHiFLY4 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj: -0.04000000 Waves 2022.08.05 08:27 [2170757] smart account 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj > SELF 0.00000000 Waves
{ "type": 13, "id": "T8qZPUstRzW3yfUS6qjcejZC78eSAJQxHoXTsHiFLY4", "fee": 4000000, "feeAssetId": null, "timestamp": 1659677268322, "version": 1, "sender": "3N9be2mwrA52WJho6DiesZkk4351GvpnWuj", "senderPublicKey": "6mzmbCza9iqbzxMEELcEA4Xc9NeF4CYpbTtz1zMK3C7x", "proofs": [ "4nAuYDuhJhUfL6guLdQmzkRfvgdaJ9EYRSv91a1YPqCTsqgPS9oPdTZn6wXc4yBxfuamumNGJg7sMpznt6njT7MP", "4eH2Mc4wLwipPoF5TGiK8HERpsnqZr79kHZCFUWKzncdeBaHRPoBCvzjawJfNY482jDWQ99Ak3G86GWoE9sxh9Li", "22Gt31Qdd7vfHwcsy3cdBLFfEdSAkfpnxEgCNDA39GZnvgcpFenKefBeEDPixH33Nn6CMZuDDrQvKxGb8HKfxYBn" ], "script": "base64:BgJBCAISDgoMCAgICAgIAQEBAQEBEgUKAwgIARIAEgASBQoDCAEIEgMKAQESBAoCAQgSABIECgIIARIECgIIARIAEgCIAQEPZ2V0U3RyaW5nT3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFB2FkZHJlc3MFA2tleQkAuQkCCQDMCAICCm1hbmRhdG9yeSAJAMwIAgkApQgBBQdhZGRyZXNzCQDMCAICAS4JAMwIAgUDa2V5CQDMCAICDyBpcyBub3QgZGVmaW5lZAUDbmlsAgABBWxjYWxjAQFsCQC5CAEFAWwBDmdldE51bWJlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAABDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU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GpYdTk4bkJ3WmM3ZnF3Q1RqdEEzbm5Sd2dUYmtNU3I1U1UyTm1EUgkAzAgCAixEVXV1TGpYdTk4bkJ3WmM3ZnF3Q1RqdEEzbm5Sd2dUYmtNU3I1U1UyTm1EUgUDbmlsBQNTRVAEEHB1YktleUFkbWluc0xpc3QJALUJAgkBC3ZhbHVlT3JFbHNlAgkAnQgCBQ9jb250cm9sQ29udHJhY3QCDCVzX19tdWx0aXNpZwUTcHViS2V5QWRtaW5zTGlzdFN0cgUDU0VQBAVjb3VudAkAZAIJAGQCCQBkAgMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkAkQMCBRBwdWJLZXlBZG1pbnNMaXN0AAAAAQAAAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQkA2QQBCQCRAwIFEHB1YktleUFkbWluc0xpc3QAAQABAAADCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACCQDZBAEJAJEDAgUQcHViS2V5QWRtaW5zTGlzdAACAAEAAAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAMJANkEAQkAkQMCBRBwdWJLZXlBZG1pbnNMaXN0AAMAAgAABAckbWF0Y2gwBQJ0eAMJAAECBQckbWF0Y2gwAhVTcG9uc29yRmVlVHJhbnNhY3Rpb24ECXNwb25zb3JUeAUHJG1hdGNoMAMJARtjaGVja0lzVmFsaWRNaW5TcG9uc29yZWRGZWUBBQlzcG9uc29yVHgJAGcCBQVjb3VudAADBwkAZwIFBWNvdW50AAMcAawL", "chainId": 84, "height": 2170757, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CYkRYRqixhzcBUwhi7Luja2EgmXmBpmHq9apum3g9Lsq Next: 2YTUDVy5c9WEf2XUhRfABTXnpMgw11i9VWM6xBZivQZx Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func lcalc (l) = calculateLeaseId(l) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func asAnyList (v) = match v { | |
29 | 29 | case l: List[Any] => | |
30 | 30 | l | |
31 | 31 | case _ => | |
32 | 32 | throw("fail to cast into List[Any]") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func asString (v) = match v { | |
37 | 37 | case s: String => | |
38 | 38 | s | |
39 | 39 | case _ => | |
40 | 40 | throw("fail to cast into String") | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func asInt (v) = match v { | |
45 | 45 | case i: Int => | |
46 | 46 | i | |
47 | 47 | case _ => | |
48 | 48 | throw("fail to cast into Int") | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func asPayment (v) = match v { | |
53 | 53 | case p: AttachedPayment => | |
54 | 54 | p | |
55 | 55 | case _ => | |
56 | 56 | throw("fail to cast into AttachedPayment") | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func asSwapParamsSTRUCT (v) = match v { | |
61 | 61 | case struct: (Int, Int, Int, Int, Int) => | |
62 | 62 | struct | |
63 | 63 | case _ => | |
64 | 64 | throw("fail to cast into Int") | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | let SEP = "__" | |
69 | 69 | ||
70 | 70 | let WAVELET = 100000000 | |
71 | 71 | ||
72 | 72 | let PAULI = 1000000 | |
73 | 73 | ||
74 | 74 | let PRICELET = 1000000 | |
75 | 75 | ||
76 | 76 | let DEFAULTSWAPFEE = 20000 | |
77 | 77 | ||
78 | 78 | let IdxNetAmount = 0 | |
79 | 79 | ||
80 | 80 | let IdxFeeAmount = 1 | |
81 | 81 | ||
82 | 82 | let IdxGrossAmount = 2 | |
83 | 83 | ||
84 | 84 | let IdxControlCfgNeutrinoDapp = 1 | |
85 | 85 | ||
86 | 86 | let IdxControlCfgAuctionDapp = 2 | |
87 | 87 | ||
88 | 88 | let IdxControlCfgRpdDapp = 3 | |
89 | 89 | ||
90 | 90 | let IdxControlCfgMathDapp = 4 | |
91 | 91 | ||
92 | 92 | let IdxControlCfgLiquidationDapp = 5 | |
93 | 93 | ||
94 | 94 | let IdxControlCfgRestDapp = 6 | |
95 | 95 | ||
96 | 96 | let IdxControlCfgNodeRegistryDapp = 7 | |
97 | 97 | ||
98 | 98 | let IdxControlCfgNsbtStakingDapp = 8 | |
99 | 99 | ||
100 | 100 | let IdxControlCfgMediatorDapp = 9 | |
101 | 101 | ||
102 | 102 | let IdxControlCfgSurfStakingDapp = 10 | |
103 | 103 | ||
104 | 104 | let IdxControlCfgGnsbtControllerDapp = 11 | |
105 | 105 | ||
106 | 106 | func keyControlAddress () = "%s%s__config__controlAddress" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyControlCfg () = "%s__controlConfig" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
119 | 119 | ||
120 | 120 | let controlCfg = readControlCfgOrFail(controlContract) | |
121 | 121 | ||
122 | 122 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
123 | 123 | ||
124 | 124 | let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp) | |
125 | 125 | ||
126 | 126 | let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp) | |
127 | 127 | ||
128 | 128 | let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp) | |
129 | 129 | ||
130 | 130 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
131 | 131 | ||
132 | 132 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
133 | 133 | ||
134 | 134 | let BondAssetIdKey = "bond_asset_id" | |
135 | 135 | ||
136 | 136 | let AuctionContractKey = "auction_contract" | |
137 | 137 | ||
138 | 138 | let NsbtStakingContractKey = "nsbtStakingContract" | |
139 | 139 | ||
140 | 140 | let LiquidationContractKey = "liquidation_contract" | |
141 | 141 | ||
142 | 142 | let RPDContractKey = "rpd_contract" | |
143 | 143 | ||
144 | 144 | let ContolContractKey = "control_contract" | |
145 | 145 | ||
146 | 146 | let MathContractKey = "math_contract" | |
147 | 147 | ||
148 | 148 | let BalanceWavesLockIntervalKey = "balance_waves_lock_interval" | |
149 | 149 | ||
150 | 150 | let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval" | |
151 | 151 | ||
152 | 152 | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
153 | 153 | ||
154 | 154 | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
155 | 155 | ||
156 | 156 | let NodeOracleProviderPubKeyKey = "node_oracle_provider" | |
157 | 157 | ||
158 | 158 | let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart" | |
159 | 159 | ||
160 | 160 | let WavesOutFeePartKey = "wavesOut_swap_feePart" | |
161 | 161 | ||
162 | 162 | func keyNodeRegistry (address) = ("%s__" + address) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | let PriceKey = "price" | |
166 | 166 | ||
167 | 167 | let PriceIndexKey = "price_index" | |
168 | 168 | ||
169 | 169 | let IsBlockedKey = "is_blocked" | |
170 | 170 | ||
171 | 171 | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func getStakingNodeByIndex (idx) = getStringByKey(makeString(["%s%d%s", "lease", toString(idx), "nodeAddress"], SEP)) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getStakingNodeAddressByIndex (idx) = addressFromStringValue(getStakingNodeByIndex(idx)) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func getReservedAmountForSponsorship () = valueOrElse(getInteger(this, makeString(["%s%s", "lease", "sponsorshipWavesReserve"], SEP)), (1000 * WAVELET)) | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner) | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func getLeaseIdKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "id"], SEP) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func getLeaseIdByAddressKey (nodeAddress) = makeString(["%s%s%s", "leaseByAddress", nodeAddress, "id"], SEP) | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func getLeaseAmountKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "amount"], SEP) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func getLeaseAmountByAddressKey (nodeAddress) = makeString(["%s%s%s", "leaseByAddress", nodeAddress, "amount"], SEP) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func getLeaseGroupNodeListKey (groupNum) = makeString(["%s%d%s", "leaseGroup", toString(groupNum), "nodeList"], SEP) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func minSwapAmountKEY (swapType) = (("min_" + swapType) + "_swap_amount") | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func totalLockedKEY (swapType) = ("balance_lock_" + swapType) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func totalLockedByUserKEY (swapType,owner) = makeString(["balance_lock", swapType, owner], "_") | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func balanceLockIntervalKEY (swapType) = (("balance_" + swapType) + "_lock_interval") | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func nodeBalanceLockIntervalKEY () = "balance_node_lock_interval" | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func outFeePartKEY (swapType) = (swapType + "Out_swap_feePart") | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func swapsTimeframeKEY () = "swaps_timeframe" | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func minSwapAmountREAD (swapType) = valueOrElse(getInteger(this, minSwapAmountKEY(swapType)), 0) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func swapsTimeframeREAD () = valueOrElse(getInteger(this, swapsTimeframeKEY()), 1440) | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func totalLockedREAD (swapType) = valueOrElse(getInteger(this, totalLockedKEY(swapType)), 0) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func totalLockedByUserREAD (swapType,owner) = valueOrElse(getInteger(this, totalLockedByUserKEY(swapType, owner)), 0) | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func balanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, balanceLockIntervalKEY(swapType)), 1440) | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func nodeBalanceLockIntervalREAD () = valueOrElse(getInteger(this, nodeBalanceLockIntervalKEY()), 1) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func keySwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "swapUserSpentInPeriod", userAddress], SEP) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func keyUserLastSwapHeight (userAddress) = makeString(["%s%s", "userLastSwapHeight", userAddress], SEP) | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI) | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET) | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func convertJsonArrayToList (jsonArray) = split(jsonArray, ",") | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | func minSwapAmountFAIL (swapType,minSwapAmount) = throw(((("The specified amount in " + swapType) + " swap is less than the required minimum of ") + toString(minSwapAmount))) | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func emergencyShutdownFAIL () = throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | func priceIndexFAIL (index,priceIndex,indexHeight,unlockHeight,prevIndexHeight) = throw(((((((((("invalid price history index: index=" + toString(index)) + " priceIndex=") + toString(priceIndex)) + " indexHeight=") + toString(indexHeight)) + " unlockHeight=") + toString(unlockHeight)) + " prevIndexHeight=") + toString(prevIndexHeight))) | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
271 | 271 | ||
272 | 272 | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
273 | 273 | ||
274 | 274 | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
275 | 275 | ||
276 | 276 | let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey)) | |
277 | 277 | ||
278 | 278 | let bondAssetId = fromBase58String("F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z") | |
279 | 279 | ||
280 | 280 | let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF") | |
281 | 281 | ||
282 | 282 | let neutrinoContract = this | |
283 | 283 | ||
284 | 284 | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
285 | 285 | ||
286 | 286 | func checkIsValidMinSponsoredFee (tx) = { | |
287 | 287 | let MINTRANSFERFEE = 100000 | |
288 | 288 | let SponsoredFeeUpperBound = 1000 | |
289 | 289 | let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, currentPrice) | |
290 | 290 | let minNeutrinoFee = (realNeutrinoFee * 2) | |
291 | 291 | let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100) | |
292 | 292 | let inputFee = value(tx.minSponsoredAssetFee) | |
293 | 293 | if (if ((inputFee >= minNeutrinoFee)) | |
294 | 294 | then (maxNeutrinoFee >= inputFee) | |
295 | 295 | else false) | |
296 | 296 | then (tx.assetId == neutrinoAssetId) | |
297 | 297 | else false | |
298 | 298 | } | |
299 | 299 | ||
300 | 300 | ||
301 | 301 | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
305 | 305 | ||
306 | 306 | ||
307 | 307 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP) | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | let sIdxSwapType = 1 | |
311 | 311 | ||
312 | 312 | let sIdxStatus = 2 | |
313 | 313 | ||
314 | 314 | let sIdxInAmount = 3 | |
315 | 315 | ||
316 | 316 | let sIdxPrice = 4 | |
317 | 317 | ||
318 | 318 | let sIdxOutNetAmount = 5 | |
319 | 319 | ||
320 | 320 | let sIdxOutFeeAmount = 6 | |
321 | 321 | ||
322 | 322 | let sIdxStartHeight = 7 | |
323 | 323 | ||
324 | 324 | let sIdxStartTimestamp = 8 | |
325 | 325 | ||
326 | 326 | let sIdxEndHeight = 9 | |
327 | 327 | ||
328 | 328 | let sIdxEndTimestamp = 10 | |
329 | 329 | ||
330 | 330 | let sIdxSelfUnlockHeight = 11 | |
331 | 331 | ||
332 | 332 | let sIdxRandUnlockHeight = 12 | |
333 | 333 | ||
334 | 334 | let sIdxIndex = 13 | |
335 | 335 | ||
336 | 336 | let sIdxWithdrawTxId = 14 | |
337 | 337 | ||
338 | 338 | let sIdxMinRand = 15 | |
339 | 339 | ||
340 | 340 | let sIdxMaxRand = 16 | |
341 | 341 | ||
342 | 342 | func swapKEY (userAddress,txId) = makeString(["%s%s", userAddress, txId], SEP) | |
343 | 343 | ||
344 | 344 | ||
345 | 345 | func strSwapDATA (swapType,status,inAmount,price,outNetAmount,outFeeAmount,startHeight,startTimestamp,endHeight,endTimestamp,selfUnlockHeight,randUnlockHeight,index,withdrawTxId,randMin,randMax) = makeString(["%s%s%d%d%d%d%d%d%d%d%d%d%d%s", swapType, status, inAmount, price, outNetAmount, outFeeAmount, startHeight, startTimestamp, endHeight, endTimestamp, selfUnlockHeight, randUnlockHeight, index, withdrawTxId, randMin, randMax], SEP) | |
346 | 346 | ||
347 | 347 | ||
348 | 348 | func pendingSwapDATA (swapType,inAssetAmount,selfUnlockHeight) = strSwapDATA(swapType, "PENDING", toString(inAssetAmount), "0", "0", "0", toString(height), toString(lastBlock.timestamp), "0", "0", toString(selfUnlockHeight), "0", "0", "NULL", "0", "0") | |
349 | 349 | ||
350 | 350 | ||
351 | 351 | func finishSwapDATA (dataArray,price,outNetAmount,outFeeAmount,randUnlockHeight,index,withdrawTxId) = strSwapDATA(dataArray[sIdxSwapType], "FINISHED", dataArray[sIdxInAmount], toString(price), toString(outNetAmount), toString(outFeeAmount), dataArray[sIdxStartHeight], dataArray[sIdxStartTimestamp], toString(height), toString(lastBlock.timestamp), dataArray[sIdxSelfUnlockHeight], toString(randUnlockHeight), toString(index), withdrawTxId, dataArray[sIdxMinRand], dataArray[sIdxMaxRand]) | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | func swapDataFailOrREAD (userAddress,swapTxId) = { | |
355 | 355 | let swapKey = swapKEY(userAddress, swapTxId) | |
356 | 356 | split(valueOrErrorMessage(getString(this, swapKey), ("no swap data for " + swapKey)), SEP) | |
357 | 357 | } | |
358 | 358 | ||
359 | 359 | ||
360 | 360 | func applyFees (amountGross,feePart) = { | |
361 | 361 | let feeAmount = fraction(amountGross, feePart, PAULI) | |
362 | 362 | [(amountGross - feeAmount), feeAmount, amountGross] | |
363 | 363 | } | |
364 | 364 | ||
365 | 365 | ||
366 | 366 | func abs (x) = if ((0 > x)) | |
367 | 367 | then -(x) | |
368 | 368 | else x | |
369 | 369 | ||
370 | 370 | ||
371 | 371 | func selectNode (unleaseAmount) = { | |
372 | 372 | let amountToLease = ((wavesBalance(neutrinoContract).available - unleaseAmount) - getReservedAmountForSponsorship()) | |
373 | 373 | let oldLeased0 = getNumberByKey(getLeaseAmountKey(0)) | |
374 | 374 | let oldLeased1 = getNumberByKey(getLeaseAmountKey(1)) | |
375 | 375 | let newLeased0 = (amountToLease + oldLeased0) | |
376 | 376 | let newLeased1 = (amountToLease + oldLeased1) | |
377 | 377 | if (if ((newLeased0 > 0)) | |
378 | 378 | then true | |
379 | 379 | else (newLeased1 > 0)) | |
380 | 380 | then { | |
381 | 381 | let delta0 = abs((newLeased0 - oldLeased1)) | |
382 | 382 | let delta1 = abs((newLeased1 - oldLeased0)) | |
383 | 383 | if ((delta1 >= delta0)) | |
384 | 384 | then $Tuple2(0, newLeased0) | |
385 | 385 | else $Tuple2(1, newLeased1) | |
386 | 386 | } | |
387 | 387 | else $Tuple2(-1, 0) | |
388 | 388 | } | |
389 | 389 | ||
390 | 390 | ||
391 | 391 | func thisOnly (i) = if ((i.caller != this)) | |
392 | 392 | then throw("Permission denied: this contract only allowed") | |
393 | 393 | else true | |
394 | 394 | ||
395 | 395 | ||
396 | 396 | func prepareUnleaseAndLease (unleaseAmount) = { | |
397 | 397 | let nodeTuple = selectNode(unleaseAmount) | |
398 | 398 | let nodeIndex = nodeTuple._1 | |
399 | 399 | let newLeaseAmount = nodeTuple._2 | |
400 | 400 | if ((newLeaseAmount > 0)) | |
401 | 401 | then { | |
402 | 402 | let leaseIdKey = getLeaseIdKey(nodeIndex) | |
403 | 403 | let oldLease = getBinary(this, leaseIdKey) | |
404 | 404 | let unleaseOrEmpty = if (isDefined(oldLease)) | |
405 | 405 | then [LeaseCancel(value(oldLease))] | |
406 | 406 | else nil | |
407 | 407 | let leaseAmountKey = getLeaseAmountKey(nodeIndex) | |
408 | 408 | let lease = Lease(getStakingNodeAddressByIndex(nodeIndex), newLeaseAmount) | |
409 | 409 | (unleaseOrEmpty ++ [lease, BinaryEntry(leaseIdKey, lcalc(lease)), IntegerEntry(getLeaseAmountKey(nodeIndex), newLeaseAmount)]) | |
410 | 410 | } | |
411 | 411 | else nil | |
412 | 412 | } | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | func readNodeInfo (nodeIdx) = { | |
416 | 416 | let nodeAddress = getStakingNodeAddressByIndex(nodeIdx) | |
417 | 417 | let leasedAmtKEY = getLeaseAmountKey(nodeIdx) | |
418 | 418 | let leasedAmt = getNumberByKey(leasedAmtKEY) | |
419 | 419 | let leaseIdKEY = getLeaseIdKey(nodeIdx) | |
420 | 420 | let leaseId = value(getBinary(this, leaseIdKEY)) | |
421 | 421 | $Tuple5(nodeAddress, leasedAmtKEY, leasedAmt, leaseIdKEY, leaseId) | |
422 | 422 | } | |
423 | 423 | ||
424 | 424 | ||
425 | 425 | func commonSwap (swapType,pmtAmount,userAddressStr,txId58,swapParamsByUserSYSREADONLY) = { | |
426 | 426 | let $t01722417304 = swapParamsByUserSYSREADONLY | |
427 | 427 | let swapLimitMax = $t01722417304._1 | |
428 | 428 | let swapLimitSpent = $t01722417304._2 | |
429 | 429 | let blcks2LmtReset = $t01722417304._3 | |
430 | 430 | let minSwapAmount = minSwapAmountREAD(swapType) | |
431 | 431 | let totalLocked = totalLockedREAD(swapType) | |
432 | 432 | let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr) | |
433 | 433 | let nodeAddress = getStakingNodeByIndex(0) | |
434 | 434 | let priceByIndex = getPriceHistory(getHeightPriceByIndex(priceIndex)) | |
435 | 435 | let isSwapByNode = (nodeAddress == userAddressStr) | |
436 | 436 | let balanceLockMaxInterval = if (isSwapByNode) | |
437 | 437 | then nodeBalanceLockIntervalREAD() | |
438 | 438 | else balanceLockIntervalREAD(swapType) | |
439 | 439 | let selfUnlockHeight = (height + balanceLockMaxInterval) | |
440 | 440 | let swapUsdnVolume = if ((swapType == "neutrino")) | |
441 | 441 | then pmtAmount | |
442 | 442 | else convertWavesToNeutrino(pmtAmount, priceByIndex) | |
443 | 443 | if ((minSwapAmount > pmtAmount)) | |
444 | 444 | then minSwapAmountFAIL(swapType, minSwapAmount) | |
445 | 445 | else if (if (!(isSwapByNode)) | |
446 | 446 | then (swapLimitSpent > 0) | |
447 | 447 | else false) | |
448 | 448 | then throw(("You have exceeded swap limit! Next allowed swap height is " + toString((height + blcks2LmtReset)))) | |
449 | 449 | else if (if (!(isSwapByNode)) | |
450 | 450 | then (swapUsdnVolume > swapLimitMax) | |
451 | 451 | else false) | |
452 | 452 | then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(swapLimitMax))) | |
453 | 453 | else if (isBlocked) | |
454 | 454 | then emergencyShutdownFAIL() | |
455 | 455 | else { | |
456 | 456 | let leasePart = if ((swapType == "waves")) | |
457 | 457 | then prepareUnleaseAndLease(0) | |
458 | 458 | else nil | |
459 | 459 | $Tuple2(([IntegerEntry(keySwapUserSpentInPeriod(userAddressStr), swapUsdnVolume), IntegerEntry(keyUserLastSwapHeight(userAddressStr), height), IntegerEntry(totalLockedByUserKEY(swapType, userAddressStr), (totalLockedByUser + pmtAmount)), IntegerEntry(getBalanceUnlockBlockKey(userAddressStr), selfUnlockHeight), IntegerEntry(totalLockedKEY(swapType), (totalLocked + pmtAmount)), StringEntry(swapKEY(userAddressStr, txId58), pendingSwapDATA(swapType, pmtAmount, selfUnlockHeight))] ++ leasePart), unit) | |
460 | 460 | } | |
461 | 461 | } | |
462 | 462 | ||
463 | 463 | ||
464 | 464 | func commonWithdraw (account,index,swapTxId,withdrawTxId) = { | |
465 | 465 | let userAddress = addressFromStringValue(account) | |
466 | 466 | let dataArray = swapDataFailOrREAD(account, swapTxId) | |
467 | 467 | let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight]) | |
468 | 468 | let swapType = dataArray[sIdxSwapType] | |
469 | 469 | let inAmount = parseIntValue(dataArray[sIdxInAmount]) | |
470 | 470 | let swapStatus = dataArray[sIdxStatus] | |
471 | 471 | let startHeight = parseIntValue(dataArray[sIdxStartHeight]) | |
472 | 472 | let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE) | |
473 | 473 | let totalLocked = totalLockedREAD(swapType) | |
474 | 474 | let totalLockedByUser = totalLockedByUserREAD(swapType, account) | |
475 | 475 | let unlockHeight = selfUnlockHeight | |
476 | 476 | let indexHeight = getHeightPriceByIndex(index) | |
477 | 477 | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
478 | 478 | let priceByIndex = getPriceHistory(indexHeight) | |
479 | 479 | let outAmountGrossTuple = if ((swapType == "waves")) | |
480 | 480 | then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId) | |
481 | 481 | else if ((swapType == "neutrino")) | |
482 | 482 | then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit) | |
483 | 483 | else throw(("Unsupported swap type " + swapType)) | |
484 | 484 | let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart) | |
485 | 485 | let outNetAmount = payoutsArray[IdxNetAmount] | |
486 | 486 | let outFeeAmount = payoutsArray[IdxFeeAmount] | |
487 | 487 | if (isBlocked) | |
488 | 488 | then emergencyShutdownFAIL() | |
489 | 489 | else if ((swapStatus != "PENDING")) | |
490 | 490 | then throw("swap has been already processed") | |
491 | 491 | else if ((unlockHeight > height)) | |
492 | 492 | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds")) | |
493 | 493 | else if (if (if ((index > priceIndex)) | |
494 | 494 | then true | |
495 | 495 | else (unlockHeight > indexHeight)) | |
496 | 496 | then true | |
497 | 497 | else if ((prevIndexHeight != 0)) | |
498 | 498 | then (prevIndexHeight >= unlockHeight) | |
499 | 499 | else false) | |
500 | 500 | then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight) | |
501 | 501 | else if ((0 >= payoutsArray[IdxGrossAmount])) | |
502 | 502 | then throw("balance equals zero") | |
503 | 503 | else if (if ((0 > outFeePart)) | |
504 | 504 | then true | |
505 | 505 | else (outFeePart >= PAULI)) | |
506 | 506 | then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart))) | |
507 | 507 | else { | |
508 | 508 | let unleaseAmount = if (if ((swapType == "neutrino")) | |
509 | 509 | then (outAmountGrossTuple._1 > 0) | |
510 | 510 | else false) | |
511 | 511 | then outAmountGrossTuple._1 | |
512 | 512 | else 0 | |
513 | 513 | let state = [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAmountGrossTuple._2), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, priceByIndex, outNetAmount, outFeeAmount, unlockHeight, index, withdrawTxId))] | |
514 | 514 | $Tuple3(state, AttachedPayment(outAmountGrossTuple._2, outFeeAmount), unleaseAmount) | |
515 | 515 | } | |
516 | 516 | } | |
517 | 517 | ||
518 | 518 | ||
519 | 519 | @Callable(i) | |
520 | 520 | func constructor (neutrinoAssetIdPrm,bondAssetIdPrm,auctionContractPrm,liquidationContractPrm,rpdContractPrm,nodeOracleProviderPubKeyPrm,balanceWavesLockIntervalPrm,balanceNeutrinoLockIntervalPrm,minWavesSwapAmountPrm,minNeutrinoSwapAmountPrm,neutrinoOutFeePartPrm,wavesOutFeePartPrm) = { | |
521 | 521 | let checkCaller = thisOnly(i) | |
522 | 522 | if ((checkCaller == checkCaller)) | |
523 | 523 | then if ((size(i.payments) != 0)) | |
524 | 524 | then throw("no payments allowed") | |
525 | 525 | else [StringEntry(NeutrinoAssetIdKey, neutrinoAssetIdPrm), StringEntry(BondAssetIdKey, bondAssetIdPrm), StringEntry(AuctionContractKey, auctionContractPrm), StringEntry(LiquidationContractKey, liquidationContractPrm), StringEntry(RPDContractKey, rpdContractPrm), StringEntry(NodeOracleProviderPubKeyKey, nodeOracleProviderPubKeyPrm), IntegerEntry(BalanceWavesLockIntervalKey, balanceWavesLockIntervalPrm), IntegerEntry(BalanceNeutrinoLockIntervalKey, balanceNeutrinoLockIntervalPrm), IntegerEntry(MinWavesSwapAmountKey, minWavesSwapAmountPrm), IntegerEntry(MinNeutrinoSwapAmountKey, minNeutrinoSwapAmountPrm), IntegerEntry(NeutrinoOutFeePartKey, neutrinoOutFeePartPrm), IntegerEntry(WavesOutFeePartKey, wavesOutFeePartPrm)] | |
526 | 526 | else throw("Strict value is not equal to itself.") | |
527 | 527 | } | |
528 | 528 | ||
529 | 529 | ||
530 | 530 | ||
531 | 531 | @Callable(i) | |
532 | 532 | func constructorV2 (mathContract,nsbtStakingContract,swapsTimeframeBlocks) = { | |
533 | 533 | let checkCaller = thisOnly(i) | |
534 | 534 | if ((checkCaller == checkCaller)) | |
535 | 535 | then if ((size(i.payments) != 0)) | |
536 | 536 | then throw("no payments allowed") | |
537 | 537 | else [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)] | |
538 | 538 | else throw("Strict value is not equal to itself.") | |
539 | 539 | } | |
540 | 540 | ||
541 | 541 | ||
542 | 542 | ||
543 | 543 | @Callable(i) | |
544 | 544 | func swapWavesToNeutrino () = if ((size(i.payments) != 1)) | |
545 | 545 | then throw("swapWavesToNeutrino require only one payment") | |
546 | 546 | else { | |
547 | 547 | let pmt = value(i.payments[0]) | |
548 | 548 | if (isDefined(pmt.assetId)) | |
549 | 549 | then throw("Only Waves token is allowed for swapping.") | |
550 | 550 | else { | |
551 | 551 | let userAddress = toString(i.caller) | |
552 | 552 | let txId58 = toBase58String(i.transactionId) | |
553 | 553 | let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil)) | |
554 | 554 | let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapParamsSTRUCT) | |
555 | 555 | commonSwapResult | |
556 | 556 | } | |
557 | 557 | } | |
558 | 558 | ||
559 | 559 | ||
560 | 560 | ||
561 | 561 | @Callable(i) | |
562 | 562 | func swapNeutrinoToWaves () = if ((size(i.payments) != 1)) | |
563 | 563 | then throw("swapNeutrinoToWaves require only one payment") | |
564 | 564 | else { | |
565 | 565 | let pmt = value(i.payments[0]) | |
566 | 566 | if ((pmt.assetId != neutrinoAssetId)) | |
567 | 567 | then throw("Only appropriate Neutrino tokens are allowed for swapping.") | |
568 | 568 | else { | |
569 | 569 | let userAddress = toString(i.caller) | |
570 | 570 | let txId58 = toBase58String(i.transactionId) | |
571 | 571 | let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil)) | |
572 | 572 | let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapParamsSTRUCT) | |
573 | 573 | commonSwapResult | |
574 | 574 | } | |
575 | 575 | } | |
576 | 576 | ||
577 | 577 | ||
578 | 578 | ||
579 | 579 | @Callable(i) | |
580 | 580 | func withdraw (account,index,swapTxId) = { | |
581 | 581 | let txId = toBase58String(i.transactionId) | |
582 | 582 | if ((size(i.payments) != 0)) | |
583 | 583 | then throw("no payments allowed") | |
584 | 584 | else { | |
585 | 585 | let commonTuple = commonWithdraw(account, index, swapTxId, txId) | |
586 | 586 | let state = commonTuple._1 | |
587 | 587 | let fee = commonTuple._2 | |
588 | 588 | let unleaseAmt = commonTuple._3 | |
589 | 589 | let unleaseInvOrEmpty = invoke(this, "internalUnleaseAndLease", [unleaseAmt], nil) | |
590 | 590 | if ((unleaseInvOrEmpty == unleaseInvOrEmpty)) | |
591 | 591 | then { | |
592 | 592 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", ["", 0, 0], nil)) | |
593 | 593 | let gnsbtAmtTotal = asInt(gnsbtData[1]) | |
594 | 594 | let gnsbtAmtFromSurfTotal = asInt(asAnyList(gnsbtData[3])[3]) | |
595 | 595 | let surfFeeAmt = if ((gnsbtAmtTotal != 0)) | |
596 | 596 | then fraction(fee.amount, gnsbtAmtFromSurfTotal, gnsbtAmtTotal) | |
597 | 597 | else 0 | |
598 | 598 | let nsbtFeeAmt = (fee.amount - surfFeeAmt) | |
599 | 599 | let surfDeposit = if ((surfFeeAmt > 0)) | |
600 | 600 | then { | |
601 | 601 | let surfInv = invoke(surfStakingContract, "deposit", nil, [AttachedPayment(fee.assetId, surfFeeAmt)]) | |
602 | 602 | if ((surfInv == surfInv)) | |
603 | 603 | then nil | |
604 | 604 | else throw("Strict value is not equal to itself.") | |
605 | 605 | } | |
606 | 606 | else nil | |
607 | 607 | if ((surfDeposit == surfDeposit)) | |
608 | 608 | then { | |
609 | 609 | let nsbtDeposit = if ((nsbtFeeAmt > 0)) | |
610 | 610 | then { | |
611 | 611 | let nsbtInv = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(fee.assetId, nsbtFeeAmt)]) | |
612 | 612 | if ((nsbtInv == nsbtInv)) | |
613 | 613 | then nil | |
614 | 614 | else throw("Strict value is not equal to itself.") | |
615 | 615 | } | |
616 | 616 | else nil | |
617 | 617 | if ((nsbtDeposit == nsbtDeposit)) | |
618 | 618 | then state | |
619 | 619 | else throw("Strict value is not equal to itself.") | |
620 | 620 | } | |
621 | 621 | else throw("Strict value is not equal to itself.") | |
622 | 622 | } | |
623 | 623 | else throw("Strict value is not equal to itself.") | |
624 | 624 | } | |
625 | 625 | } | |
626 | 626 | ||
627 | 627 | ||
628 | 628 | ||
629 | 629 | @Callable(i) | |
630 | 630 | func internalUnleaseAndLease (unleaseAmount) = if ((i.caller != this)) | |
631 | 631 | then throw("internalUnleaseAndLease is not public method") | |
632 | 632 | else prepareUnleaseAndLease(unleaseAmount) | |
633 | 633 | ||
634 | 634 | ||
635 | 635 | ||
636 | 636 | @Callable(i) | |
637 | 637 | func transferUsdnToUser (amount,addr) = if ((i.caller != auctionContract)) | |
638 | 638 | then throw("Only auction contract is authorized") | |
639 | 639 | else [ScriptTransfer(addressFromStringValue(addr), amount, neutrinoAssetId)] | |
640 | 640 | ||
641 | 641 | ||
642 | 642 | ||
643 | 643 | @Callable(i) | |
644 | 644 | func acceptWaves () = if ((i.caller != auctionContract)) | |
645 | 645 | then throw("Currently only auction contract is allowed to call") | |
646 | 646 | else $Tuple2(prepareUnleaseAndLease(0), "success") | |
647 | 647 | ||
648 | 648 | ||
649 | 649 | ||
650 | 650 | @Callable(i) | |
651 | 651 | func approveLeasings (nListS,groupNum) = { | |
652 | 652 | let lAmt = (50 * WAVELET) | |
653 | 653 | let nIdxs = [0, 1, 2, 3, 4, 5, 6, 7] | |
654 | 654 | let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur") | |
655 | 655 | let mngPub = fromBase58String(mngPubS) | |
656 | 656 | let nodeRegAddrStr = valueOrElse(getString("%s%s__cfg__nodesRegistryAddress"), "3P9vKqQKjUdmpXAfiWau8krREYAY1Xr69pE") | |
657 | 657 | let nodeRegAddr = addressFromStringValue(nodeRegAddrStr) | |
658 | 658 | let lGroupNodeListKEY = getLeaseGroupNodeListKey(groupNum) | |
659 | 659 | let lGrNodeOpt = getString(this, lGroupNodeListKEY) | |
660 | 660 | if (isDefined(lGrNodeOpt)) | |
661 | 661 | then throw((("group " + toString(groupNum)) + " already initialized")) | |
662 | 662 | else { | |
663 | 663 | let nList = split(nListS, SEP) | |
664 | 664 | let expCount = size(nIdxs) | |
665 | 665 | if ((i.callerPublicKey != mngPub)) | |
666 | 666 | then throw("approveLeasings not authorized") | |
667 | 667 | else { | |
668 | 668 | let $t02838428446 = readNodeInfo(0) | |
669 | 669 | let nAddr0 = $t02838428446._1 | |
670 | 670 | let lAmtKEY0 = $t02838428446._2 | |
671 | 671 | let lAmt0 = $t02838428446._3 | |
672 | 672 | let lIdKEY0 = $t02838428446._4 | |
673 | 673 | let lId0 = $t02838428446._5 | |
674 | 674 | let $t02844928511 = readNodeInfo(1) | |
675 | 675 | let nAddr1 = $t02844928511._1 | |
676 | 676 | let lAmtKEY1 = $t02844928511._2 | |
677 | 677 | let lAmt1 = $t02844928511._3 | |
678 | 678 | let lIdKEY1 = $t02844928511._4 | |
679 | 679 | let lId1 = $t02844928511._5 | |
680 | 680 | let newL0 = Lease(nAddr0, (lAmt0 - ((lAmt * expCount) / 2))) | |
681 | 681 | let newL1 = Lease(nAddr1, (lAmt1 - ((lAmt * expCount) / 2))) | |
682 | 682 | let validation = invoke(nodeRegAddr, "validateAndApproveLeasings", [nListS], nil) | |
683 | 683 | if ((validation == validation)) | |
684 | 684 | then { | |
685 | 685 | func forEachNodeValidateAndGenerateLease (a,i) = { | |
686 | 686 | let node = nList[i] | |
687 | 687 | let la = Lease(addressFromStringValue(node), lAmt) | |
688 | 688 | (a ++ [la, BinaryEntry(getLeaseIdByAddressKey(node), lcalc(la)), IntegerEntry(getLeaseAmountByAddressKey(node), lAmt)]) | |
689 | 689 | } | |
690 | 690 | ||
691 | 691 | ([StringEntry(lGroupNodeListKEY, nListS), BinaryEntry(lIdKEY0, lcalc(newL0)), BinaryEntry(lIdKEY1, lcalc(newL1)), IntegerEntry(lAmtKEY0, newL0.amount), IntegerEntry(lAmtKEY1, newL1.amount), LeaseCancel(lId0), LeaseCancel(lId1), newL0, newL1] ++ { | |
692 | 692 | let $l = nIdxs | |
693 | 693 | let $s = size($l) | |
694 | 694 | let $acc0 = nil | |
695 | 695 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
696 | 696 | then $a | |
697 | 697 | else forEachNodeValidateAndGenerateLease($a, $l[$i]) | |
698 | 698 | ||
699 | 699 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
700 | 700 | then $a | |
701 | 701 | else throw("List size exceeds 8") | |
702 | 702 | ||
703 | 703 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
704 | 704 | }) | |
705 | 705 | } | |
706 | 706 | else throw("Strict value is not equal to itself.") | |
707 | 707 | } | |
708 | 708 | } | |
709 | 709 | } | |
710 | 710 | ||
711 | 711 | ||
712 | 712 | ||
713 | 713 | @Callable(i) | |
714 | 714 | func swapParamsByUserSYSREADONLY (userAddressStr,gnsbtDiff) = { | |
715 | 715 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStr, 0, 0], nil)) | |
716 | 716 | let gnsbtAmt = (asInt(gnsbtData[0]) + gnsbtDiff) | |
717 | 717 | let gnsbtAmtTotal = (asInt(gnsbtData[1]) + gnsbtDiff) | |
718 | 718 | let swapLimitMax = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [gnsbtAmt], nil)) | |
719 | 719 | let lastSwapHeight = valueOrElse(getInteger(this, keyUserLastSwapHeight(userAddressStr)), 0) | |
720 | 720 | let swapLimitTimelifeBlocks = swapsTimeframeREAD() | |
721 | 721 | let passedBlocksAfterLastSwap = (height - lastSwapHeight) | |
722 | 722 | let isSwapTimelifeNew = (passedBlocksAfterLastSwap >= swapLimitTimelifeBlocks) | |
723 | 723 | let swapLimitSpent = if (isSwapTimelifeNew) | |
724 | 724 | then 0 | |
725 | 725 | else valueOrElse(getInteger(this, keySwapUserSpentInPeriod(userAddressStr)), 0) | |
726 | 726 | let blcks2LmtReset = if (isSwapTimelifeNew) | |
727 | 727 | then 0 | |
728 | 728 | else (swapLimitTimelifeBlocks - passedBlocksAfterLastSwap) | |
729 | 729 | $Tuple2(nil, $Tuple5(swapLimitMax, swapLimitSpent, blcks2LmtReset, gnsbtAmt, gnsbtAmtTotal)) | |
730 | 730 | } | |
731 | 731 | ||
732 | 732 | ||
733 | 733 | ||
734 | 734 | @Callable(i) | |
735 | 735 | func updateReservesAndNeutrinoSupply () = { | |
736 | 736 | func getNumberByKeyInternal (key) = match getInteger(this, key) { | |
737 | 737 | case a: Int => | |
738 | 738 | a | |
739 | 739 | case _ => | |
740 | 740 | 0 | |
741 | 741 | } | |
742 | 742 | ||
743 | 743 | let nMetrix = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
744 | 744 | let idx = getNumberByKeyInternal("updateReservesAndNeutrinoSupplyIdx") | |
745 | 745 | let newIdx = (idx + 1) | |
746 | 746 | [IntegerEntry("updateReservesAndNeutrinoSupplyIdx", newIdx), IntegerEntry("reserve", asInt(nMetrix[3])), IntegerEntry("neutrinoSupply", asInt(nMetrix[5])), IntegerEntry("reservesInUsdn", convertWavesToNeutrino(asInt(nMetrix[3]), asInt(nMetrix[0]))), IntegerEntry("surplus", asInt(nMetrix[6])), IntegerEntry("deficit", -(asInt(nMetrix[6])))] | |
747 | 747 | } | |
748 | 748 | ||
749 | 749 | ||
750 | 750 | ||
751 | 751 | @Callable(i) | |
752 | 752 | func wavesBalancesVsPayment () = { | |
753 | 753 | let b = wavesBalance(this) | |
754 | 754 | [IntegerEntry("wavesBalance_available", b.available), IntegerEntry("wavesBalance_regular", b.regular), IntegerEntry("wavesBalance_generating", b.generating), IntegerEntry("wavesBalance_effective", b.effective), IntegerEntry("waves_payment", value(i.payments[0]).amount)] | |
755 | 755 | } | |
756 | 756 | ||
757 | 757 | ||
758 | 758 | @Verifier(tx) | |
759 | 759 | func verify () = { | |
760 | 760 | let id = toBase58String(tx.id) | |
761 | 761 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
762 | 762 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
763 | 763 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
764 | 764 | then 1 | |
765 | 765 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
766 | 766 | then 1 | |
767 | 767 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
768 | 768 | then 1 | |
769 | 769 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
770 | 770 | then 2 | |
771 | 771 | else 0)) | |
772 | 772 | match tx { | |
773 | 773 | case sponsorTx: SponsorFeeTransaction => | |
774 | 774 | if (checkIsValidMinSponsoredFee(sponsorTx)) | |
775 | 775 | then (count >= 3) | |
776 | 776 | else false | |
777 | 777 | case _ => | |
778 | 778 | (count >= 3) | |
779 | 779 | } | |
780 | 780 | } | |
781 | 781 |
github/deemru/w8io/026f985 82.80 ms ◑