tx · 91q5zjyaVMW4S2c2ySi2xtdyWa5rRq3NxtHjEU8SmG8a 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj: -0.03700000 Waves 2023.01.07 12:05 [2394331] smart account 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj > SELF 0.00000000 Waves
{ "type": 13, "id": "91q5zjyaVMW4S2c2ySi2xtdyWa5rRq3NxtHjEU8SmG8a", "fee": 3700000, "feeAssetId": null, "timestamp": 1673082346982, "version": 2, "chainId": 84, "sender": "3N9be2mwrA52WJho6DiesZkk4351GvpnWuj", "senderPublicKey": "6mzmbCza9iqbzxMEELcEA4Xc9NeF4CYpbTtz1zMK3C7x", "proofs": [ "PZ4jd8dQGEHKRDPL7mD9LrsSmyEtpNYvPHKxv6gRqfup36QGNJ73X9UTVTLg7J8EnZj1BCib2Fr4mbqA3Ti32Wy", "65qkjrX4QV7brgThA4urkRTxwYxwZPCgTqQKfTVicFSjyXycqgH3u4f8TsZmNDcnKNi8cT4A5FytbH8h8F7Qov6S", "fswVLoMCpGtDHPEPKULBRfirsMfXfUwqZVwhJKzAktZdpAwAhewHVAAVNEW1kjAcPUbLeJugUbcoJ7CD6GH7RCM" ], "script": "base64:BgJXCAISDgoMCAgICAgIAQEBAQEBEgUKAwgIARIAEgASBQoDCAEIEgMKAQESBAoCAQgSABIFCgMIAQESBAoCAQESBAoCCAESBQoDCAEBEgYKBAgIAQESABIAqAEBD2dldFN0cmluZ09yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQUHYWRkcmVzcwkAzAgCAgEuCQDMCAIFA2tleQkAzAgCAg8gaXMgbm90IGRlZmluZWQFA25pbAIAAQVsY2FsYwEBbAkAuQgBBQFsAQ5nZXROdW1iZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQA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bWF0Y2gwAhVTcG9uc29yRmVlVHJhbnNhY3Rpb24ECXNwb25zb3JUeAUHJG1hdGNoMAMJARtjaGVja0lzVmFsaWRNaW5TcG9uc29yZWRGZWUBBQlzcG9uc29yVHgJAGcCBQVjb3VudAADBwkAZwIFBWNvdW50AAPta7/t", "height": 2394331, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C8WxQYAr55HoeNifbxH5pRVS131xdyMgNoCL8apzStiC Next: 4xKYLTW2puBWSmkjN2BfNKoWQSgA9qLvTiqbF69ipSpd Diff:
Old | New | Differences | |
---|---|---|---|
523 | 523 | ||
524 | 524 | func calcWithdrawW2U (wavesIn,price) = { | |
525 | 525 | let outAmtGross = convertWavesToNeutrino(wavesIn, price) | |
526 | - | $ | |
526 | + | $Tuple10(outAmtGross, neutrinoAssetId, 0, unit, 0, price, wavesIn, 0, 0, 0) | |
527 | 527 | } | |
528 | 528 | ||
529 | 529 | ||
541 | 541 | let allowedUsdn = (allowedUsdnBeforeMinBr + allowedUsdnAfterMinBr) | |
542 | 542 | let usdn2SURF = (usdnIn - allowedUsdn) | |
543 | 543 | let outAmtGross = convertNeutrinoToWaves(allowedUsdn, price) | |
544 | - | $ | |
544 | + | $Tuple10(outAmtGross, unit, usdn2SURF, neutrinoAssetId, outAmtGross, price, allowedUsdn, maxAllowedUsdnBeforeMinBr, allowedUsdnBeforeMinBr, allowedUsdnAfterMinBr) | |
545 | 545 | } | |
546 | 546 | ||
547 | 547 | ||
567 | 567 | let inAmtToSurfPart = outDataTuple._3 | |
568 | 568 | let inAssetId = outDataTuple._4 | |
569 | 569 | let unleaseAmt = outDataTuple._5 | |
570 | + | let withdrawPrice = outDataTuple._6 | |
570 | 571 | let payoutsArray = applyFees(outAmtGross, inAmtToSurfPart, outFeePart) | |
571 | 572 | let outNetAmt = payoutsArray[IdxNetAmount] | |
572 | 573 | let outFeeAmt = payoutsArray[IdxFeeAmount] | |
576 | 577 | let surfResult = asAnyList(invoke(mathContract, "surfFunctionREADONLY", [inAmtToSurfPart, inAssetId], nil)) | |
577 | 578 | asInt(surfResult[bFuncIdxSurf]) | |
578 | 579 | } | |
579 | - | $ | |
580 | + | $Tuple8(outNetAmt, outAssetId, outSurfAmt, inAmtToSurfPart, unleaseAmt, outFeeAmt, outAmtGross, withdrawPrice) | |
580 | 581 | } | |
581 | 582 | } | |
582 | 583 | ||
618 | 619 | let unleaseAmt = withdrawTuple._5 | |
619 | 620 | let outFeeAmount = withdrawTuple._6 | |
620 | 621 | let outAmtGross = withdrawTuple._7 | |
622 | + | let withdrawPrice = withdrawTuple._8 | |
621 | 623 | if ((0 >= outAmtGross)) | |
622 | 624 | then throw("balance equals zero") | |
623 | 625 | else { | |
624 | 626 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
625 | - | let state = [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAssetId), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, | |
627 | + | let state = [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAssetId), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, withdrawPrice, outNetAmount, outFeeAmount, unlockHeight, index, withdrawTxId, outSurfAmt, BR))] | |
626 | 628 | let surfCondition = if ((outSurfAmt > 0)) | |
627 | 629 | then { | |
628 | 630 | let issueResult = invoke(auctionContract, "issueSurf", [outSurfAmt, account], nil) | |
818 | 820 | if ((i.callerPublicKey != mngPub)) | |
819 | 821 | then throw("approveLeasings not authorized") | |
820 | 822 | else { | |
821 | - | let $ | |
822 | - | let nAddr0 = $ | |
823 | - | let lAmtKEY0 = $ | |
824 | - | let lAmt0 = $ | |
825 | - | let lIdKEY0 = $ | |
826 | - | let lId0 = $ | |
823 | + | let $t03574835810 = readNodeInfo(0) | |
824 | + | let nAddr0 = $t03574835810._1 | |
825 | + | let lAmtKEY0 = $t03574835810._2 | |
826 | + | let lAmt0 = $t03574835810._3 | |
827 | + | let lIdKEY0 = $t03574835810._4 | |
828 | + | let lId0 = $t03574835810._5 | |
827 | 829 | let newL0 = Lease(nAddr0, (lAmt0 - (lAmt * expCount))) | |
828 | 830 | let validation = invoke(nodeRegAddr, "validateAndApproveLeasings", [nListS], nil) | |
829 | 831 | if ((validation == validation)) | |
868 | 870 | then throw("rebalanceLeasings not authorized") | |
869 | 871 | else { | |
870 | 872 | let unleaseAmt = ((amount / size(nList)) + 1) | |
871 | - | let $ | |
872 | - | let nAddr0 = $ | |
873 | - | let lAmtKEY0 = $ | |
874 | - | let lAmt0 = $ | |
875 | - | let lIdKEY0 = $ | |
876 | - | let lId0 = $ | |
873 | + | let $t03705037112 = readNodeInfo(0) | |
874 | + | let nAddr0 = $t03705037112._1 | |
875 | + | let lAmtKEY0 = $t03705037112._2 | |
876 | + | let lAmt0 = $t03705037112._3 | |
877 | + | let lIdKEY0 = $t03705037112._4 | |
878 | + | let lId0 = $t03705037112._5 | |
877 | 879 | let newL0 = Lease(nAddr0, (lAmt0 + (unleaseAmt * size(nList)))) | |
878 | 880 | func forEachNodeDoUnlease (a,i) = { | |
879 | 881 | let node = nList[i] |
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 asBytes (val) = match val { | |
53 | 53 | case valByte: ByteVector => | |
54 | 54 | valByte | |
55 | 55 | case _ => | |
56 | 56 | throw("fail to cast into ByteVector") | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func asPayment (v) = match v { | |
61 | 61 | case p: AttachedPayment => | |
62 | 62 | p | |
63 | 63 | case _ => | |
64 | 64 | throw("fail to cast into AttachedPayment") | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func asSwapParamsSTRUCT (v) = match v { | |
69 | 69 | case struct: (Int, Int, Int, Int, Int, Int, Int) => | |
70 | 70 | struct | |
71 | 71 | case _ => | |
72 | 72 | throw("fail to cast into Tuple5 ints") | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | let SEP = "__" | |
77 | 77 | ||
78 | 78 | let LISTSEP = ":" | |
79 | 79 | ||
80 | 80 | let WAVELET = 100000000 | |
81 | 81 | ||
82 | 82 | let PAULI = 1000000 | |
83 | 83 | ||
84 | 84 | let PRICELET = 1000000 | |
85 | 85 | ||
86 | 86 | let DEFAULTSWAPFEE = 20000 | |
87 | 87 | ||
88 | 88 | let BRPROTECTED = 100000 | |
89 | 89 | ||
90 | 90 | let IdxNetAmount = 0 | |
91 | 91 | ||
92 | 92 | let IdxFeeAmount = 1 | |
93 | 93 | ||
94 | 94 | let IdxGrossAmount = 2 | |
95 | 95 | ||
96 | 96 | let IdxControlCfgNeutrinoDapp = 1 | |
97 | 97 | ||
98 | 98 | let IdxControlCfgAuctionDapp = 2 | |
99 | 99 | ||
100 | 100 | let IdxControlCfgRpdDapp = 3 | |
101 | 101 | ||
102 | 102 | let IdxControlCfgMathDapp = 4 | |
103 | 103 | ||
104 | 104 | let IdxControlCfgLiquidationDapp = 5 | |
105 | 105 | ||
106 | 106 | let IdxControlCfgRestDapp = 6 | |
107 | 107 | ||
108 | 108 | let IdxControlCfgNodeRegistryDapp = 7 | |
109 | 109 | ||
110 | 110 | let IdxControlCfgNsbtStakingDapp = 8 | |
111 | 111 | ||
112 | 112 | let IdxControlCfgMediatorDapp = 9 | |
113 | 113 | ||
114 | 114 | let IdxControlCfgSurfStakingDapp = 10 | |
115 | 115 | ||
116 | 116 | let IdxControlCfgGnsbtControllerDapp = 11 | |
117 | 117 | ||
118 | 118 | let IdxControlCfgRestV2Dapp = 12 | |
119 | 119 | ||
120 | 120 | let IdxControlCfgGovernanceDapp = 13 | |
121 | 121 | ||
122 | 122 | func keyControlAddress () = "%s%s__config__controlAddress" | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyControlCfg () = "%s__controlConfig" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
135 | 135 | ||
136 | 136 | let controlCfg = readControlCfgOrFail(controlContract) | |
137 | 137 | ||
138 | 138 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
139 | 139 | ||
140 | 140 | let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp) | |
141 | 141 | ||
142 | 142 | let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp) | |
143 | 143 | ||
144 | 144 | let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp) | |
145 | 145 | ||
146 | 146 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
147 | 147 | ||
148 | 148 | let nodeRegistryContract = getContractAddressOrFail(controlCfg, IdxControlCfgNodeRegistryDapp) | |
149 | 149 | ||
150 | 150 | let govContract = getContractAddressOrFail(controlCfg, IdxControlCfgGovernanceDapp) | |
151 | 151 | ||
152 | 152 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
153 | 153 | ||
154 | 154 | let BondAssetIdKey = "bond_asset_id" | |
155 | 155 | ||
156 | 156 | let AuctionContractKey = "auction_contract" | |
157 | 157 | ||
158 | 158 | let NsbtStakingContractKey = "nsbtStakingContract" | |
159 | 159 | ||
160 | 160 | let LiquidationContractKey = "liquidation_contract" | |
161 | 161 | ||
162 | 162 | let RPDContractKey = "rpd_contract" | |
163 | 163 | ||
164 | 164 | let ContolContractKey = "control_contract" | |
165 | 165 | ||
166 | 166 | let MathContractKey = "math_contract" | |
167 | 167 | ||
168 | 168 | let BalanceWavesLockIntervalKey = "balance_waves_lock_interval" | |
169 | 169 | ||
170 | 170 | let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval" | |
171 | 171 | ||
172 | 172 | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
173 | 173 | ||
174 | 174 | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
175 | 175 | ||
176 | 176 | let NodeOracleProviderPubKeyKey = "node_oracle_provider" | |
177 | 177 | ||
178 | 178 | let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart" | |
179 | 179 | ||
180 | 180 | let WavesOutFeePartKey = "wavesOut_swap_feePart" | |
181 | 181 | ||
182 | 182 | func keyNodeRegistry (address) = ("%s__" + address) | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | let PriceKey = "price" | |
186 | 186 | ||
187 | 187 | let PriceIndexKey = "price_index" | |
188 | 188 | ||
189 | 189 | let IsBlockedKey = "is_blocked" | |
190 | 190 | ||
191 | 191 | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func getStakingNodeByIndex (idx) = getStringByKey(makeString(["%s%d%s", "lease", toString(idx), "nodeAddress"], SEP)) | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func getStakingNodeAddressByIndex (idx) = addressFromStringValue(getStakingNodeByIndex(idx)) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func getReservedAmountForSponsorship () = valueOrElse(getInteger(this, makeString(["%s%s", "lease", "sponsorshipWavesReserve"], SEP)), (1000 * WAVELET)) | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner) | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func getLeaseIdKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "id"], SEP) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func getLeaseIdByAddressKey (nodeAddress) = makeString(["%s%s%s", "leaseByAddress", nodeAddress, "id"], SEP) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func getLeaseAmountKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "amount"], SEP) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func getLeaseAmountByAddressKey (nodeAddress) = makeString(["%s%s%s", "leaseByAddress", nodeAddress, "amount"], SEP) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func getLeaseGroupNodeListKey (groupNum) = makeString(["%s%d%s", "leaseGroup", toString(groupNum), "nodeList"], SEP) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func minSwapAmountKEY (swapType) = (("min_" + swapType) + "_swap_amount") | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func totalLockedKEY (swapType) = ("balance_lock_" + swapType) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func totalLockedByUserKEY (swapType,owner) = makeString(["balance_lock", swapType, owner], "_") | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func balanceLockIntervalKEY (swapType) = (("balance_" + swapType) + "_lock_interval") | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func nodeBalanceLockIntervalKEY () = "balance_node_lock_interval" | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | func outFeePartKEY (swapType) = (swapType + "Out_swap_feePart") | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func swapsTimeframeKEY () = "swaps_timeframe" | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func brProtectedKEY () = "min_BR_protection_level" | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | func minSwapAmountREAD (swapType) = valueOrElse(getInteger(this, minSwapAmountKEY(swapType)), 0) | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func swapsTimeframeREAD () = valueOrElse(getInteger(this, swapsTimeframeKEY()), 1440) | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | func totalLockedREAD (swapType) = valueOrElse(getInteger(this, totalLockedKEY(swapType)), 0) | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func totalLockedByUserREAD (swapType,owner) = valueOrElse(getInteger(this, totalLockedByUserKEY(swapType, owner)), 0) | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func balanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, balanceLockIntervalKEY(swapType)), 1440) | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | func nodeBalanceLockIntervalREAD () = valueOrElse(getInteger(this, nodeBalanceLockIntervalKEY()), 1) | |
264 | 264 | ||
265 | 265 | ||
266 | 266 | func keySwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "swapUserSpentInPeriod", userAddress], SEP) | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func keyUserLastSwapHeight (userAddress) = makeString(["%s%s", "userLastSwapHeight", userAddress], SEP) | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI) | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET) | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price) | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | func convertJsonArrayToList (jsonArray) = split(jsonArray, ",") | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | func minSwapAmountFAIL (swapType,minSwapAmount) = throw(((("The specified amount in " + swapType) + " swap is less than the required minimum of ") + toString(minSwapAmount))) | |
285 | 285 | ||
286 | 286 | ||
287 | 287 | func emergencyShutdownFAIL () = throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | 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))) | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
294 | 294 | ||
295 | 295 | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
296 | 296 | ||
297 | 297 | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
298 | 298 | ||
299 | 299 | let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey)) | |
300 | 300 | ||
301 | 301 | let bondAssetId = fromBase58String("F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z") | |
302 | 302 | ||
303 | 303 | let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF") | |
304 | 304 | ||
305 | 305 | let neutrinoContract = this | |
306 | 306 | ||
307 | 307 | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
308 | 308 | ||
309 | 309 | func checkIsValidMinSponsoredFee (tx) = { | |
310 | 310 | let MINTRANSFERFEE = 100000 | |
311 | 311 | let SponsoredFeeUpperBound = 1000 | |
312 | 312 | let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, currentPrice) | |
313 | 313 | let minNeutrinoFee = (realNeutrinoFee * 2) | |
314 | 314 | let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100) | |
315 | 315 | let inputFee = value(tx.minSponsoredAssetFee) | |
316 | 316 | if (if ((inputFee >= minNeutrinoFee)) | |
317 | 317 | then (maxNeutrinoFee >= inputFee) | |
318 | 318 | else false) | |
319 | 319 | then (tx.assetId == neutrinoAssetId) | |
320 | 320 | else false | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
325 | 325 | ||
326 | 326 | ||
327 | 327 | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
328 | 328 | ||
329 | 329 | ||
330 | 330 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP) | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | let sIdxSwapType = 1 | |
334 | 334 | ||
335 | 335 | let sIdxStatus = 2 | |
336 | 336 | ||
337 | 337 | let sIdxInAmount = 3 | |
338 | 338 | ||
339 | 339 | let sIdxStartHeight = 7 | |
340 | 340 | ||
341 | 341 | let sIdxStartTimestamp = 8 | |
342 | 342 | ||
343 | 343 | let sIdxSelfUnlockHeight = 11 | |
344 | 344 | ||
345 | 345 | let sIdxMinRand = 15 | |
346 | 346 | ||
347 | 347 | let sIdxMaxRand = 16 | |
348 | 348 | ||
349 | 349 | func swapKEY (userAddress,txId) = makeString(["%s%s", userAddress, txId], SEP) | |
350 | 350 | ||
351 | 351 | ||
352 | 352 | func strSwapDATA (swapType,status,inAmount,price,outNetAmount,outFeeAmount,startHeight,startTimestamp,endHeight,endTimestamp,selfUnlockHeight,randUnlockHeight,index,withdrawTxId,randMin,randMax,outSurfAmt,br) = makeString(["%s%s%d%d%d%d%d%d%d%d%d%d%d%s%d%d%d%d", swapType, status, inAmount, price, outNetAmount, outFeeAmount, startHeight, startTimestamp, endHeight, endTimestamp, selfUnlockHeight, randUnlockHeight, index, withdrawTxId, randMin, randMax, outSurfAmt, br], SEP) | |
353 | 353 | ||
354 | 354 | ||
355 | 355 | 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", "0", "0") | |
356 | 356 | ||
357 | 357 | ||
358 | 358 | func finishSwapDATA (dataArray,price,outNetAmount,outFeeAmount,randUnlockHeight,index,withdrawTxId,outSurfAmt,br) = 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], toString(outSurfAmt), toString(br)) | |
359 | 359 | ||
360 | 360 | ||
361 | 361 | func swapDataFailOrREAD (userAddress,swapTxId) = { | |
362 | 362 | let swapKey = swapKEY(userAddress, swapTxId) | |
363 | 363 | split(valueOrErrorMessage(getString(this, swapKey), ("no swap data for " + swapKey)), SEP) | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | 367 | func applyFees (amountOutGross,inAmtToSURF,feePart) = { | |
368 | 368 | let feeAmount = fraction(amountOutGross, feePart, PAULI) | |
369 | 369 | [(amountOutGross - feeAmount), feeAmount] | |
370 | 370 | } | |
371 | 371 | ||
372 | 372 | ||
373 | 373 | func abs (x) = if ((0 > x)) | |
374 | 374 | then -(x) | |
375 | 375 | else x | |
376 | 376 | ||
377 | 377 | ||
378 | 378 | func selectNode (unleaseAmount) = { | |
379 | 379 | let amountToLease = ((wavesBalance(neutrinoContract).available - unleaseAmount) - getReservedAmountForSponsorship()) | |
380 | 380 | let oldLeased0 = getNumberByKey(getLeaseAmountKey(0)) | |
381 | 381 | let oldLeased1 = getNumberByKey(getLeaseAmountKey(1)) | |
382 | 382 | let newLeased0 = (amountToLease + oldLeased0) | |
383 | 383 | let newLeased1 = (amountToLease + oldLeased1) | |
384 | 384 | if (if ((newLeased0 > 0)) | |
385 | 385 | then true | |
386 | 386 | else (newLeased1 > 0)) | |
387 | 387 | then { | |
388 | 388 | let delta0 = abs((newLeased0 - oldLeased1)) | |
389 | 389 | let delta1 = abs((newLeased1 - oldLeased0)) | |
390 | 390 | if ((delta1 >= delta0)) | |
391 | 391 | then $Tuple2(0, newLeased0) | |
392 | 392 | else $Tuple2(1, newLeased1) | |
393 | 393 | } | |
394 | 394 | else $Tuple2(-1, 0) | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | func thisOnly (i) = if ((i.caller != this)) | |
399 | 399 | then throw("Permission denied: this contract only allowed") | |
400 | 400 | else true | |
401 | 401 | ||
402 | 402 | ||
403 | 403 | func prepareUnleaseAndLease (unleaseAmount) = { | |
404 | 404 | let nodeTuple = selectNode(unleaseAmount) | |
405 | 405 | let nodeIndex = nodeTuple._1 | |
406 | 406 | let newLeaseAmount = nodeTuple._2 | |
407 | 407 | if ((newLeaseAmount > 0)) | |
408 | 408 | then { | |
409 | 409 | let leaseIdKey = getLeaseIdKey(nodeIndex) | |
410 | 410 | let oldLease = getBinary(this, leaseIdKey) | |
411 | 411 | let unleaseOrEmpty = if (isDefined(oldLease)) | |
412 | 412 | then [LeaseCancel(value(oldLease))] | |
413 | 413 | else nil | |
414 | 414 | let leaseAmountKey = getLeaseAmountKey(nodeIndex) | |
415 | 415 | let lease = Lease(getStakingNodeAddressByIndex(nodeIndex), newLeaseAmount) | |
416 | 416 | (unleaseOrEmpty ++ [lease, BinaryEntry(leaseIdKey, lcalc(lease)), IntegerEntry(getLeaseAmountKey(nodeIndex), newLeaseAmount)]) | |
417 | 417 | } | |
418 | 418 | else nil | |
419 | 419 | } | |
420 | 420 | ||
421 | 421 | ||
422 | 422 | func readNodeInfo (nodeIdx) = { | |
423 | 423 | let nodeAddress = getStakingNodeAddressByIndex(nodeIdx) | |
424 | 424 | let leasedAmtKEY = getLeaseAmountKey(nodeIdx) | |
425 | 425 | let leasedAmt = getNumberByKey(leasedAmtKEY) | |
426 | 426 | let leaseIdKEY = getLeaseIdKey(nodeIdx) | |
427 | 427 | let leaseId = value(getBinary(this, leaseIdKEY)) | |
428 | 428 | $Tuple5(nodeAddress, leasedAmtKEY, leasedAmt, leaseIdKEY, leaseId) | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | func commonSwap (swapType,pmtAmount,userAddressStr,txId58,swapParamsByUserSYSREADONLY) = { | |
433 | 433 | let swapLimitSpent = swapParamsByUserSYSREADONLY._2 | |
434 | 434 | let blcks2LmtReset = swapParamsByUserSYSREADONLY._3 | |
435 | 435 | let wavesSwapLimitMax = swapParamsByUserSYSREADONLY._6 | |
436 | 436 | let usdnSwapLimitMax = swapParamsByUserSYSREADONLY._7 | |
437 | 437 | let minSwapAmount = minSwapAmountREAD(swapType) | |
438 | 438 | let totalLocked = totalLockedREAD(swapType) | |
439 | 439 | let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr) | |
440 | 440 | let nodeAddress = getStakingNodeByIndex(0) | |
441 | 441 | let priceByIndex = getPriceHistory(getHeightPriceByIndex(priceIndex)) | |
442 | 442 | let isSwapByNode = (nodeAddress == userAddressStr) | |
443 | 443 | let balanceLockMaxInterval = if (isSwapByNode) | |
444 | 444 | then nodeBalanceLockIntervalREAD() | |
445 | 445 | else balanceLockIntervalREAD(swapType) | |
446 | 446 | let selfUnlockHeight = (height + balanceLockMaxInterval) | |
447 | 447 | let swapUsdnVolume = if ((swapType == "neutrino")) | |
448 | 448 | then pmtAmount | |
449 | 449 | else convertWavesToNeutrino(pmtAmount, priceByIndex) | |
450 | 450 | let swapLimitMax = if ((swapType == "neutrino")) | |
451 | 451 | then usdnSwapLimitMax | |
452 | 452 | else convertWavesToNeutrino(wavesSwapLimitMax, priceByIndex) | |
453 | 453 | if ((minSwapAmount > pmtAmount)) | |
454 | 454 | then minSwapAmountFAIL(swapType, minSwapAmount) | |
455 | 455 | else if (if (!(isSwapByNode)) | |
456 | 456 | then (swapLimitSpent > 0) | |
457 | 457 | else false) | |
458 | 458 | then throw(("You have exceeded swap limit! Next allowed swap height is " + toString((height + blcks2LmtReset)))) | |
459 | 459 | else if (if (!(isSwapByNode)) | |
460 | 460 | then (swapUsdnVolume > swapLimitMax) | |
461 | 461 | else false) | |
462 | 462 | then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(swapLimitMax))) | |
463 | 463 | else if (isBlocked) | |
464 | 464 | then emergencyShutdownFAIL() | |
465 | 465 | else { | |
466 | 466 | let leasePart = if ((swapType == "waves")) | |
467 | 467 | then prepareUnleaseAndLease(0) | |
468 | 468 | else nil | |
469 | 469 | $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) | |
470 | 470 | } | |
471 | 471 | } | |
472 | 472 | ||
473 | 473 | ||
474 | 474 | let nMetricIdxPrice = 0 | |
475 | 475 | ||
476 | 476 | let nMetricIdxUsdnLockedBalance = 1 | |
477 | 477 | ||
478 | 478 | let nMetricIdxWavesLockedBalance = 2 | |
479 | 479 | ||
480 | 480 | let nMetricIdxReserve = 3 | |
481 | 481 | ||
482 | 482 | let nMetricIdxReserveInUsdn = 4 | |
483 | 483 | ||
484 | 484 | let nMetricIdxUsdnSupply = 5 | |
485 | 485 | ||
486 | 486 | let nMetricIdxSurplus = 6 | |
487 | 487 | ||
488 | 488 | let nMetricIdxSurplusPercent = 7 | |
489 | 489 | ||
490 | 490 | let nMetricIdxBR = 8 | |
491 | 491 | ||
492 | 492 | let nMetricIdxNsbtSupply = 9 | |
493 | 493 | ||
494 | 494 | let nMetricIdxMaxNsbtSupply = 10 | |
495 | 495 | ||
496 | 496 | let nMetricIdxSurfSupply = 11 | |
497 | 497 | ||
498 | 498 | let nMetricUsdnUsdtPeg = 12 | |
499 | 499 | ||
500 | 500 | let nMetricCurrentPriceAdj = 13 | |
501 | 501 | ||
502 | 502 | let bFuncIdxSurf = 0 | |
503 | 503 | ||
504 | 504 | let bFuncIdxWaves = 1 | |
505 | 505 | ||
506 | 506 | let bFuncIdxUsdn = 2 | |
507 | 507 | ||
508 | 508 | let bFuncIdxReserveStart = 3 | |
509 | 509 | ||
510 | 510 | let bFuncIdxSupplyStart = 4 | |
511 | 511 | ||
512 | 512 | let bFuncIdxBRStart = 5 | |
513 | 513 | ||
514 | 514 | let bFuncIdxReserveEnd = 6 | |
515 | 515 | ||
516 | 516 | let bFuncIdxSupplyEnd = 7 | |
517 | 517 | ||
518 | 518 | let bFuncIdxBREnd = 8 | |
519 | 519 | ||
520 | 520 | let bFuncIdxRest = 9 | |
521 | 521 | ||
522 | 522 | let bFuncIdxWavesPrice = 10 | |
523 | 523 | ||
524 | 524 | func calcWithdrawW2U (wavesIn,price) = { | |
525 | 525 | let outAmtGross = convertWavesToNeutrino(wavesIn, price) | |
526 | - | $ | |
526 | + | $Tuple10(outAmtGross, neutrinoAssetId, 0, unit, 0, price, wavesIn, 0, 0, 0) | |
527 | 527 | } | |
528 | 528 | ||
529 | 529 | ||
530 | 530 | func calcWithdrawU2W (usdnIn,price,br,reservesInUsdn,usdnSupply) = { | |
531 | 531 | let brProtected = valueOrElse(getInteger(this, brProtectedKEY()), BRPROTECTED) | |
532 | 532 | let maxAllowedUsdnBeforeMinBr = if ((brProtected >= br)) | |
533 | 533 | then 0 | |
534 | 534 | else fraction((reservesInUsdn - fraction(brProtected, usdnSupply, PAULI)), PAULI, (PAULI - brProtected)) | |
535 | 535 | let allowedUsdnBeforeMinBr = if ((usdnIn > maxAllowedUsdnBeforeMinBr)) | |
536 | 536 | then maxAllowedUsdnBeforeMinBr | |
537 | 537 | else usdnIn | |
538 | 538 | let allowedUsdnAfterMinBr = if ((usdnIn > maxAllowedUsdnBeforeMinBr)) | |
539 | 539 | then fraction((usdnIn - maxAllowedUsdnBeforeMinBr), br, PAULI) | |
540 | 540 | else 0 | |
541 | 541 | let allowedUsdn = (allowedUsdnBeforeMinBr + allowedUsdnAfterMinBr) | |
542 | 542 | let usdn2SURF = (usdnIn - allowedUsdn) | |
543 | 543 | let outAmtGross = convertNeutrinoToWaves(allowedUsdn, price) | |
544 | - | $ | |
544 | + | $Tuple10(outAmtGross, unit, usdn2SURF, neutrinoAssetId, outAmtGross, price, allowedUsdn, maxAllowedUsdnBeforeMinBr, allowedUsdnBeforeMinBr, allowedUsdnAfterMinBr) | |
545 | 545 | } | |
546 | 546 | ||
547 | 547 | ||
548 | 548 | func calcWithdraw (swapType,inAmount,price,neutrinoMetrics) = { | |
549 | 549 | let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE) | |
550 | 550 | if (if ((0 > outFeePart)) | |
551 | 551 | then true | |
552 | 552 | else (outFeePart >= PAULI)) | |
553 | 553 | then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart))) | |
554 | 554 | else { | |
555 | 555 | let brProtected = valueOrElse(getInteger(this, brProtectedKEY()), BRPROTECTED) | |
556 | 556 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
557 | 557 | let reservesInUsdn = asInt(neutrinoMetrics[nMetricIdxReserveInUsdn]) | |
558 | 558 | let usdnSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
559 | 559 | let priceAdj = asInt(neutrinoMetrics[nMetricCurrentPriceAdj]) | |
560 | 560 | let outDataTuple = if ((swapType == "waves")) | |
561 | 561 | then calcWithdrawW2U(inAmount, price) | |
562 | 562 | else if ((swapType == "neutrino")) | |
563 | 563 | then calcWithdrawU2W(inAmount, priceAdj, BR, reservesInUsdn, usdnSupply) | |
564 | 564 | else throw(("Unsupported swap type " + swapType)) | |
565 | 565 | let outAmtGross = outDataTuple._1 | |
566 | 566 | let outAssetId = outDataTuple._2 | |
567 | 567 | let inAmtToSurfPart = outDataTuple._3 | |
568 | 568 | let inAssetId = outDataTuple._4 | |
569 | 569 | let unleaseAmt = outDataTuple._5 | |
570 | + | let withdrawPrice = outDataTuple._6 | |
570 | 571 | let payoutsArray = applyFees(outAmtGross, inAmtToSurfPart, outFeePart) | |
571 | 572 | let outNetAmt = payoutsArray[IdxNetAmount] | |
572 | 573 | let outFeeAmt = payoutsArray[IdxFeeAmount] | |
573 | 574 | let outSurfAmt = if ((0 >= inAmtToSurfPart)) | |
574 | 575 | then 0 | |
575 | 576 | else { | |
576 | 577 | let surfResult = asAnyList(invoke(mathContract, "surfFunctionREADONLY", [inAmtToSurfPart, inAssetId], nil)) | |
577 | 578 | asInt(surfResult[bFuncIdxSurf]) | |
578 | 579 | } | |
579 | - | $ | |
580 | + | $Tuple8(outNetAmt, outAssetId, outSurfAmt, inAmtToSurfPart, unleaseAmt, outFeeAmt, outAmtGross, withdrawPrice) | |
580 | 581 | } | |
581 | 582 | } | |
582 | 583 | ||
583 | 584 | ||
584 | 585 | func commonWithdraw (account,index,swapTxId,withdrawTxId,neutrinoMetrics) = { | |
585 | 586 | let userAddress = addressFromStringValue(account) | |
586 | 587 | let dataArray = swapDataFailOrREAD(account, swapTxId) | |
587 | 588 | let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight]) | |
588 | 589 | let swapType = dataArray[sIdxSwapType] | |
589 | 590 | let inAmount = parseIntValue(dataArray[sIdxInAmount]) | |
590 | 591 | let swapStatus = dataArray[sIdxStatus] | |
591 | 592 | let startHeight = parseIntValue(dataArray[sIdxStartHeight]) | |
592 | 593 | let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE) | |
593 | 594 | let totalLocked = totalLockedREAD(swapType) | |
594 | 595 | let totalLockedByUser = totalLockedByUserREAD(swapType, account) | |
595 | 596 | let unlockHeight = selfUnlockHeight | |
596 | 597 | let indexHeight = getHeightPriceByIndex(index) | |
597 | 598 | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
598 | 599 | let priceByIndex = getPriceHistory(indexHeight) | |
599 | 600 | if (isBlocked) | |
600 | 601 | then emergencyShutdownFAIL() | |
601 | 602 | else if ((swapStatus != "PENDING")) | |
602 | 603 | then throw("swap has been already processed") | |
603 | 604 | else if ((unlockHeight > height)) | |
604 | 605 | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds")) | |
605 | 606 | else if (if (if ((index > priceIndex)) | |
606 | 607 | then true | |
607 | 608 | else (unlockHeight > indexHeight)) | |
608 | 609 | then true | |
609 | 610 | else if ((prevIndexHeight != 0)) | |
610 | 611 | then (prevIndexHeight >= unlockHeight) | |
611 | 612 | else false) | |
612 | 613 | then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight) | |
613 | 614 | else { | |
614 | 615 | let withdrawTuple = calcWithdraw(swapType, inAmount, priceByIndex, neutrinoMetrics) | |
615 | 616 | let outNetAmount = withdrawTuple._1 | |
616 | 617 | let outAssetId = withdrawTuple._2 | |
617 | 618 | let outSurfAmt = withdrawTuple._3 | |
618 | 619 | let unleaseAmt = withdrawTuple._5 | |
619 | 620 | let outFeeAmount = withdrawTuple._6 | |
620 | 621 | let outAmtGross = withdrawTuple._7 | |
622 | + | let withdrawPrice = withdrawTuple._8 | |
621 | 623 | if ((0 >= outAmtGross)) | |
622 | 624 | then throw("balance equals zero") | |
623 | 625 | else { | |
624 | 626 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
625 | - | let state = [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAssetId), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, | |
627 | + | let state = [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAssetId), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, withdrawPrice, outNetAmount, outFeeAmount, unlockHeight, index, withdrawTxId, outSurfAmt, BR))] | |
626 | 628 | let surfCondition = if ((outSurfAmt > 0)) | |
627 | 629 | then { | |
628 | 630 | let issueResult = invoke(auctionContract, "issueSurf", [outSurfAmt, account], nil) | |
629 | 631 | if ((issueResult == issueResult)) | |
630 | 632 | then 0 | |
631 | 633 | else throw("Strict value is not equal to itself.") | |
632 | 634 | } | |
633 | 635 | else 0 | |
634 | 636 | if ((surfCondition == surfCondition)) | |
635 | 637 | then $Tuple3(state, AttachedPayment(outAssetId, outFeeAmount), unleaseAmt) | |
636 | 638 | else throw("Strict value is not equal to itself.") | |
637 | 639 | } | |
638 | 640 | } | |
639 | 641 | } | |
640 | 642 | ||
641 | 643 | ||
642 | 644 | func keyApplyInProgress () = "%s__applyInProgress" | |
643 | 645 | ||
644 | 646 | ||
645 | 647 | func keyProposalDataById (proposalId) = ("%s%d__proposalData__" + toString(proposalId)) | |
646 | 648 | ||
647 | 649 | ||
648 | 650 | let govIdxTxIds = 9 | |
649 | 651 | ||
650 | 652 | func validateUpdate (tx) = match tx { | |
651 | 653 | case o: Order => | |
652 | 654 | throw("Orders aren't allowed") | |
653 | 655 | case t: DataTransaction|SponsorFeeTransaction|SetScriptTransaction|CreateAliasTransaction|LeaseCancelTransaction|LeaseTransaction|IssueTransaction|InvokeExpressionTransaction|UpdateAssetInfoTransaction|InvokeScriptTransaction|SetAssetScriptTransaction|TransferTransaction|ExchangeTransaction|MassTransferTransaction|BurnTransaction|ReissueTransaction => | |
654 | 656 | let txId = toBase58String(t.id) | |
655 | 657 | let proposalId = valueOrErrorMessage(getInteger(govContract, keyApplyInProgress()), "Apply is not happening") | |
656 | 658 | let txList = split(split(getStringOrFail(govContract, keyProposalDataById(proposalId)), SEP)[govIdxTxIds], LISTSEP) | |
657 | 659 | if (!(isDefined(indexOf(txList, txId)))) | |
658 | 660 | then throw(((("Unknown txId: " + txId) + " for proposalId=") + toString(proposalId))) | |
659 | 661 | else true | |
660 | 662 | case _ => | |
661 | 663 | throw("Match error") | |
662 | 664 | } | |
663 | 665 | ||
664 | 666 | ||
665 | 667 | @Callable(i) | |
666 | 668 | func constructor (neutrinoAssetIdPrm,bondAssetIdPrm,auctionContractPrm,liquidationContractPrm,rpdContractPrm,nodeOracleProviderPubKeyPrm,balanceWavesLockIntervalPrm,balanceNeutrinoLockIntervalPrm,minWavesSwapAmountPrm,minNeutrinoSwapAmountPrm,neutrinoOutFeePartPrm,wavesOutFeePartPrm) = { | |
667 | 669 | let checkCaller = thisOnly(i) | |
668 | 670 | if ((checkCaller == checkCaller)) | |
669 | 671 | then if ((size(i.payments) != 0)) | |
670 | 672 | then throw("no payments allowed") | |
671 | 673 | 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)] | |
672 | 674 | else throw("Strict value is not equal to itself.") | |
673 | 675 | } | |
674 | 676 | ||
675 | 677 | ||
676 | 678 | ||
677 | 679 | @Callable(i) | |
678 | 680 | func constructorV2 (mathContract,nsbtStakingContract,swapsTimeframeBlocks) = { | |
679 | 681 | let checkCaller = thisOnly(i) | |
680 | 682 | if ((checkCaller == checkCaller)) | |
681 | 683 | then if ((size(i.payments) != 0)) | |
682 | 684 | then throw("no payments allowed") | |
683 | 685 | else [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)] | |
684 | 686 | else throw("Strict value is not equal to itself.") | |
685 | 687 | } | |
686 | 688 | ||
687 | 689 | ||
688 | 690 | ||
689 | 691 | @Callable(i) | |
690 | 692 | func swapWavesToNeutrino () = if ((size(i.payments) != 1)) | |
691 | 693 | then throw("swapWavesToNeutrino require only one payment") | |
692 | 694 | else { | |
693 | 695 | let pmt = value(i.payments[0]) | |
694 | 696 | if (isDefined(pmt.assetId)) | |
695 | 697 | then throw("Only Waves token is allowed for swapping.") | |
696 | 698 | else { | |
697 | 699 | let userAddress = toString(i.caller) | |
698 | 700 | let txId58 = toBase58String(i.transactionId) | |
699 | 701 | let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil)) | |
700 | 702 | let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapParamsSTRUCT) | |
701 | 703 | commonSwapResult | |
702 | 704 | } | |
703 | 705 | } | |
704 | 706 | ||
705 | 707 | ||
706 | 708 | ||
707 | 709 | @Callable(i) | |
708 | 710 | func swapNeutrinoToWaves () = if ((size(i.payments) != 1)) | |
709 | 711 | then throw("swapNeutrinoToWaves require only one payment") | |
710 | 712 | else { | |
711 | 713 | let pmt = value(i.payments[0]) | |
712 | 714 | if ((pmt.assetId != neutrinoAssetId)) | |
713 | 715 | then throw("Only appropriate Neutrino tokens are allowed for swapping.") | |
714 | 716 | else { | |
715 | 717 | let userAddress = toString(i.caller) | |
716 | 718 | let txId58 = toBase58String(i.transactionId) | |
717 | 719 | let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil)) | |
718 | 720 | let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapParamsSTRUCT) | |
719 | 721 | commonSwapResult | |
720 | 722 | } | |
721 | 723 | } | |
722 | 724 | ||
723 | 725 | ||
724 | 726 | ||
725 | 727 | @Callable(i) | |
726 | 728 | func withdraw (account,index,swapTxId) = { | |
727 | 729 | let txId = toBase58String(i.transactionId) | |
728 | 730 | if ((size(i.payments) != 0)) | |
729 | 731 | then throw("no payments allowed") | |
730 | 732 | else { | |
731 | 733 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
732 | 734 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
733 | 735 | let commonTuple = commonWithdraw(account, index, swapTxId, txId, neutrinoMetrics) | |
734 | 736 | let state = commonTuple._1 | |
735 | 737 | let fee = commonTuple._2 | |
736 | 738 | let unleaseAmt = commonTuple._3 | |
737 | 739 | let unleaseInvOrEmpty = invoke(this, "internalUnleaseAndLease", [unleaseAmt], nil) | |
738 | 740 | if ((unleaseInvOrEmpty == unleaseInvOrEmpty)) | |
739 | 741 | then { | |
740 | 742 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", ["", 0, 0], nil)) | |
741 | 743 | let gnsbtAmtTotal = asInt(gnsbtData[1]) | |
742 | 744 | let gnsbtAmtFromSurfTotal = asInt(asAnyList(gnsbtData[3])[3]) | |
743 | 745 | let surfFeeAmt1 = if ((gnsbtAmtTotal != 0)) | |
744 | 746 | then fraction(fee.amount, gnsbtAmtFromSurfTotal, gnsbtAmtTotal) | |
745 | 747 | else 0 | |
746 | 748 | let surfFeeAmt2 = if ((gnsbtAmtTotal != 0)) | |
747 | 749 | then fraction(fee.amount, (PAULI - BR), PAULI) | |
748 | 750 | else 0 | |
749 | 751 | let surfFeeAmt = max([surfFeeAmt1, surfFeeAmt2]) | |
750 | 752 | let nsbtFeeAmt = (fee.amount - surfFeeAmt) | |
751 | 753 | let surfDeposit = if ((surfFeeAmt > 0)) | |
752 | 754 | then { | |
753 | 755 | let surfInv = invoke(surfStakingContract, "deposit", nil, [AttachedPayment(fee.assetId, surfFeeAmt)]) | |
754 | 756 | if ((surfInv == surfInv)) | |
755 | 757 | then nil | |
756 | 758 | else throw("Strict value is not equal to itself.") | |
757 | 759 | } | |
758 | 760 | else nil | |
759 | 761 | if ((surfDeposit == surfDeposit)) | |
760 | 762 | then { | |
761 | 763 | let nsbtDeposit = if ((nsbtFeeAmt > 0)) | |
762 | 764 | then { | |
763 | 765 | let nsbtInv = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(fee.assetId, nsbtFeeAmt)]) | |
764 | 766 | if ((nsbtInv == nsbtInv)) | |
765 | 767 | then nil | |
766 | 768 | else throw("Strict value is not equal to itself.") | |
767 | 769 | } | |
768 | 770 | else nil | |
769 | 771 | if ((nsbtDeposit == nsbtDeposit)) | |
770 | 772 | then state | |
771 | 773 | else throw("Strict value is not equal to itself.") | |
772 | 774 | } | |
773 | 775 | else throw("Strict value is not equal to itself.") | |
774 | 776 | } | |
775 | 777 | else throw("Strict value is not equal to itself.") | |
776 | 778 | } | |
777 | 779 | } | |
778 | 780 | ||
779 | 781 | ||
780 | 782 | ||
781 | 783 | @Callable(i) | |
782 | 784 | func internalUnleaseAndLease (unleaseAmount) = if ((i.caller != this)) | |
783 | 785 | then throw("internalUnleaseAndLease is not public method") | |
784 | 786 | else prepareUnleaseAndLease(unleaseAmount) | |
785 | 787 | ||
786 | 788 | ||
787 | 789 | ||
788 | 790 | @Callable(i) | |
789 | 791 | func transferUsdnToUser (amount,addr) = if ((i.caller != auctionContract)) | |
790 | 792 | then throw("Only auction contract is authorized") | |
791 | 793 | else [ScriptTransfer(addressFromStringValue(addr), amount, neutrinoAssetId)] | |
792 | 794 | ||
793 | 795 | ||
794 | 796 | ||
795 | 797 | @Callable(i) | |
796 | 798 | func acceptWaves () = if (if ((i.caller != auctionContract)) | |
797 | 799 | then (i.caller != govContract) | |
798 | 800 | else false) | |
799 | 801 | then throw("Currently only auction and governance contracts are allowed to call") | |
800 | 802 | else $Tuple2(prepareUnleaseAndLease(0), "success") | |
801 | 803 | ||
802 | 804 | ||
803 | 805 | ||
804 | 806 | @Callable(i) | |
805 | 807 | func approveLeasings (nListS,groupNum,lAmt) = { | |
806 | 808 | let nIdxs = [0, 1, 2, 3, 4, 5, 6, 7] | |
807 | 809 | let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur") | |
808 | 810 | let mngPub = fromBase58String(mngPubS) | |
809 | 811 | let nodeRegAddrStr = valueOrElse(getString("%s%s__cfg__nodesRegistryAddress"), "3P9vKqQKjUdmpXAfiWau8krREYAY1Xr69pE") | |
810 | 812 | let nodeRegAddr = addressFromStringValue(nodeRegAddrStr) | |
811 | 813 | let lGroupNodeListKEY = getLeaseGroupNodeListKey(groupNum) | |
812 | 814 | let lGrNodeOpt = getString(this, lGroupNodeListKEY) | |
813 | 815 | if (isDefined(lGrNodeOpt)) | |
814 | 816 | then throw((("group " + toString(groupNum)) + " already initialized")) | |
815 | 817 | else { | |
816 | 818 | let nList = split(nListS, SEP) | |
817 | 819 | let expCount = size(nIdxs) | |
818 | 820 | if ((i.callerPublicKey != mngPub)) | |
819 | 821 | then throw("approveLeasings not authorized") | |
820 | 822 | else { | |
821 | - | let $ | |
822 | - | let nAddr0 = $ | |
823 | - | let lAmtKEY0 = $ | |
824 | - | let lAmt0 = $ | |
825 | - | let lIdKEY0 = $ | |
826 | - | let lId0 = $ | |
823 | + | let $t03574835810 = readNodeInfo(0) | |
824 | + | let nAddr0 = $t03574835810._1 | |
825 | + | let lAmtKEY0 = $t03574835810._2 | |
826 | + | let lAmt0 = $t03574835810._3 | |
827 | + | let lIdKEY0 = $t03574835810._4 | |
828 | + | let lId0 = $t03574835810._5 | |
827 | 829 | let newL0 = Lease(nAddr0, (lAmt0 - (lAmt * expCount))) | |
828 | 830 | let validation = invoke(nodeRegAddr, "validateAndApproveLeasings", [nListS], nil) | |
829 | 831 | if ((validation == validation)) | |
830 | 832 | then { | |
831 | 833 | func forEachNodeValidateAndGenerateLease (a,i) = { | |
832 | 834 | let node = nList[i] | |
833 | 835 | let la = Lease(addressFromStringValue(node), lAmt) | |
834 | 836 | (a ++ [la, BinaryEntry(getLeaseIdByAddressKey(node), lcalc(la)), IntegerEntry(getLeaseAmountByAddressKey(node), lAmt)]) | |
835 | 837 | } | |
836 | 838 | ||
837 | 839 | ([StringEntry(lGroupNodeListKEY, nListS), BinaryEntry(lIdKEY0, lcalc(newL0)), IntegerEntry(lAmtKEY0, newL0.amount), LeaseCancel(lId0), newL0] ++ { | |
838 | 840 | let $l = nIdxs | |
839 | 841 | let $s = size($l) | |
840 | 842 | let $acc0 = nil | |
841 | 843 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
842 | 844 | then $a | |
843 | 845 | else forEachNodeValidateAndGenerateLease($a, $l[$i]) | |
844 | 846 | ||
845 | 847 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
846 | 848 | then $a | |
847 | 849 | else throw("List size exceeds 8") | |
848 | 850 | ||
849 | 851 | $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) | |
850 | 852 | }) | |
851 | 853 | } | |
852 | 854 | else throw("Strict value is not equal to itself.") | |
853 | 855 | } | |
854 | 856 | } | |
855 | 857 | } | |
856 | 858 | ||
857 | 859 | ||
858 | 860 | ||
859 | 861 | @Callable(i) | |
860 | 862 | func rebalanceLeasings (amount,groupNum) = { | |
861 | 863 | let nIdxs = [0, 1, 2, 3, 4, 5, 6, 7] | |
862 | 864 | let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur") | |
863 | 865 | let mngPub = fromBase58String(mngPubS) | |
864 | 866 | let lGroupNodeListKEY = getLeaseGroupNodeListKey(groupNum) | |
865 | 867 | let nListS = getStringOrFail(this, lGroupNodeListKEY) | |
866 | 868 | let nList = split(nListS, SEP) | |
867 | 869 | if ((i.callerPublicKey != mngPub)) | |
868 | 870 | then throw("rebalanceLeasings not authorized") | |
869 | 871 | else { | |
870 | 872 | let unleaseAmt = ((amount / size(nList)) + 1) | |
871 | - | let $ | |
872 | - | let nAddr0 = $ | |
873 | - | let lAmtKEY0 = $ | |
874 | - | let lAmt0 = $ | |
875 | - | let lIdKEY0 = $ | |
876 | - | let lId0 = $ | |
873 | + | let $t03705037112 = readNodeInfo(0) | |
874 | + | let nAddr0 = $t03705037112._1 | |
875 | + | let lAmtKEY0 = $t03705037112._2 | |
876 | + | let lAmt0 = $t03705037112._3 | |
877 | + | let lIdKEY0 = $t03705037112._4 | |
878 | + | let lId0 = $t03705037112._5 | |
877 | 879 | let newL0 = Lease(nAddr0, (lAmt0 + (unleaseAmt * size(nList)))) | |
878 | 880 | func forEachNodeDoUnlease (a,i) = { | |
879 | 881 | let node = nList[i] | |
880 | 882 | let lIdKEY = getLeaseIdByAddressKey(node) | |
881 | 883 | let lId = getBinaryValue(this, lIdKEY) | |
882 | 884 | let lAmtKEY = getLeaseAmountByAddressKey(node) | |
883 | 885 | let lAmt = getIntegerValue(this, lAmtKEY) | |
884 | 886 | let ula = LeaseCancel(value(lId)) | |
885 | 887 | let la = Lease(addressFromStringValue(node), (lAmt - unleaseAmt)) | |
886 | 888 | (a ++ [LeaseCancel(value(lId)), la, BinaryEntry(lIdKEY, lcalc(la)), IntegerEntry(lAmtKEY, la.amount)]) | |
887 | 889 | } | |
888 | 890 | ||
889 | 891 | ({ | |
890 | 892 | let $l = nIdxs | |
891 | 893 | let $s = size($l) | |
892 | 894 | let $acc0 = nil | |
893 | 895 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
894 | 896 | then $a | |
895 | 897 | else forEachNodeDoUnlease($a, $l[$i]) | |
896 | 898 | ||
897 | 899 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
898 | 900 | then $a | |
899 | 901 | else throw("List size exceeds 8") | |
900 | 902 | ||
901 | 903 | $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) | |
902 | 904 | } ++ [BinaryEntry(lIdKEY0, lcalc(newL0)), IntegerEntry(lAmtKEY0, newL0.amount), LeaseCancel(lId0), newL0]) | |
903 | 905 | } | |
904 | 906 | } | |
905 | 907 | ||
906 | 908 | ||
907 | 909 | ||
908 | 910 | @Callable(i) | |
909 | 911 | func swapParamsByUserSYSREADONLY (userAddressStr,gnsbtDiff) = { | |
910 | 912 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStr, 0, 0], nil)) | |
911 | 913 | let gnsbtAmt = (asInt(gnsbtData[0]) + gnsbtDiff) | |
912 | 914 | let gnsbtAmtTotal = (asInt(gnsbtData[1]) + gnsbtDiff) | |
913 | 915 | let swapLimitData = asAnyList(invoke(mathContract, "calcSwapLimitREADONLY", [gnsbtAmt], nil)) | |
914 | 916 | let wavesSwapLimitInUsdnMax = asInt(swapLimitData[0]) | |
915 | 917 | let wavesSwapLimitMax = asInt(swapLimitData[1]) | |
916 | 918 | let usdnSwapLimitMax = asInt(swapLimitData[2]) | |
917 | 919 | let lastSwapHeight = valueOrElse(getInteger(this, keyUserLastSwapHeight(userAddressStr)), 0) | |
918 | 920 | let swapLimitTimelifeBlocks = swapsTimeframeREAD() | |
919 | 921 | let passedBlocksAfterLastSwap = (height - lastSwapHeight) | |
920 | 922 | let isSwapTimelifeNew = (passedBlocksAfterLastSwap >= swapLimitTimelifeBlocks) | |
921 | 923 | let swapLimitSpentInUsdn = if (isSwapTimelifeNew) | |
922 | 924 | then 0 | |
923 | 925 | else valueOrElse(getInteger(this, keySwapUserSpentInPeriod(userAddressStr)), 0) | |
924 | 926 | let blcks2LmtReset = if (isSwapTimelifeNew) | |
925 | 927 | then 0 | |
926 | 928 | else (swapLimitTimelifeBlocks - passedBlocksAfterLastSwap) | |
927 | 929 | $Tuple2(nil, $Tuple7(wavesSwapLimitInUsdnMax, swapLimitSpentInUsdn, blcks2LmtReset, gnsbtAmt, gnsbtAmtTotal, wavesSwapLimitMax, usdnSwapLimitMax)) | |
928 | 930 | } | |
929 | 931 | ||
930 | 932 | ||
931 | 933 | ||
932 | 934 | @Callable(i) | |
933 | 935 | func calcWithdrawResultSYSREADONLY (swapType,inAmount,price) = { | |
934 | 936 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
935 | 937 | $Tuple2(nil, calcWithdraw(swapType, inAmount, price, neutrinoMetrics)) | |
936 | 938 | } | |
937 | 939 | ||
938 | 940 | ||
939 | 941 | ||
940 | 942 | @Callable(i) | |
941 | 943 | func replaceCommunityNode (oldAddrStr,newAddrStr,groupNum,penaltyAmount) = { | |
942 | 944 | let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur") | |
943 | 945 | let mngPub = fromBase58String(mngPubS) | |
944 | 946 | if ((i.callerPublicKey != mngPub)) | |
945 | 947 | then throw("replaceCommunityNode not authorized") | |
946 | 948 | else { | |
947 | 949 | let groupKey = getLeaseGroupNodeListKey(groupNum) | |
948 | 950 | let groupNodeListS = getStringOrFail(this, groupKey) | |
949 | 951 | if (!(contains(groupNodeListS, oldAddrStr))) | |
950 | 952 | then throw(((("Group " + toString(groupNum)) + " does not contain address ") + oldAddrStr)) | |
951 | 953 | else { | |
952 | 954 | let doReplace = invoke(nodeRegistryContract, "replaceApprovedNode", [oldAddrStr, newAddrStr, groupNum, penaltyAmount], nil) | |
953 | 955 | if ((doReplace == doReplace)) | |
954 | 956 | then { | |
955 | 957 | let oldLeaseIdKey = getLeaseIdByAddressKey(oldAddrStr) | |
956 | 958 | let oldLeaseAmtKey = getLeaseAmountByAddressKey(oldAddrStr) | |
957 | 959 | let leaseAmt = getIntegerValue(oldLeaseAmtKey) | |
958 | 960 | let newLeaseIdKey = getLeaseIdByAddressKey(oldAddrStr) | |
959 | 961 | let newLeaseAmtKey = getLeaseAmountByAddressKey(oldAddrStr) | |
960 | 962 | let newLease = Lease(addressFromStringValue(newAddrStr), leaseAmt) | |
961 | 963 | let updatedGroupNodeListS = makeString(split(groupNodeListS, oldAddrStr), newAddrStr) | |
962 | 964 | $Tuple2([LeaseCancel(getBinaryValue(oldLeaseIdKey)), DeleteEntry(oldLeaseIdKey), DeleteEntry(oldLeaseAmtKey), StringEntry(groupKey, updatedGroupNodeListS), newLease, BinaryEntry(newLeaseIdKey, lcalc(newLease)), IntegerEntry(newLeaseAmtKey, leaseAmt)], unit) | |
963 | 965 | } | |
964 | 966 | else throw("Strict value is not equal to itself.") | |
965 | 967 | } | |
966 | 968 | } | |
967 | 969 | } | |
968 | 970 | ||
969 | 971 | ||
970 | 972 | ||
971 | 973 | @Callable(i) | |
972 | 974 | func updateReservesAndNeutrinoSupply () = { | |
973 | 975 | func getNumberByKeyInternal (key) = match getInteger(this, key) { | |
974 | 976 | case a: Int => | |
975 | 977 | a | |
976 | 978 | case _ => | |
977 | 979 | 0 | |
978 | 980 | } | |
979 | 981 | ||
980 | 982 | let nMetrix = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
981 | 983 | let idx = getNumberByKeyInternal("updateReservesAndNeutrinoSupplyIdx") | |
982 | 984 | let newIdx = (idx + 1) | |
983 | 985 | [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])))] | |
984 | 986 | } | |
985 | 987 | ||
986 | 988 | ||
987 | 989 | ||
988 | 990 | @Callable(i) | |
989 | 991 | func wavesBalancesVsPayment () = { | |
990 | 992 | let b = wavesBalance(this) | |
991 | 993 | [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)] | |
992 | 994 | } | |
993 | 995 | ||
994 | 996 | ||
995 | 997 | @Verifier(tx) | |
996 | 998 | func verify () = { | |
997 | 999 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
998 | 1000 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
999 | 1001 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
1000 | 1002 | then 1 | |
1001 | 1003 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
1002 | 1004 | then 1 | |
1003 | 1005 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
1004 | 1006 | then 1 | |
1005 | 1007 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
1006 | 1008 | then 2 | |
1007 | 1009 | else 0)) | |
1008 | 1010 | if (if (isBlocked) | |
1009 | 1011 | then (getStringValue(controlContract, "is_blocked_caller") == toString(govContract)) | |
1010 | 1012 | else false) | |
1011 | 1013 | then validateUpdate(tx) | |
1012 | 1014 | else match tx { | |
1013 | 1015 | case sponsorTx: SponsorFeeTransaction => | |
1014 | 1016 | if (checkIsValidMinSponsoredFee(sponsorTx)) | |
1015 | 1017 | then (count >= 3) | |
1016 | 1018 | else false | |
1017 | 1019 | case _ => | |
1018 | 1020 | (count >= 3) | |
1019 | 1021 | } | |
1020 | 1022 | } | |
1021 | 1023 |
github/deemru/w8io/026f985 100.28 ms ◑