tx · HnE1Q7LppwJ5sCNnEewKf2cgyQpK9ZC2gtoBJo6DpPeF 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi: -0.01400000 Waves 2022.03.09 12:29 [1956239] smart account 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi > SELF 0.00000000 Waves
{ "type": 13, "id": "HnE1Q7LppwJ5sCNnEewKf2cgyQpK9ZC2gtoBJo6DpPeF", "fee": 1400000, "feeAssetId": null, "timestamp": 1646818284237, "version": 1, "sender": "3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi", "senderPublicKey": "BwVRZtTzoCigEsffCvQ9uo7WvkoBNNGVjX4nat5X5zyQ", "proofs": [ "EY8mJhFd9jtJMLL2o89oT7ssbiJsvQ3VMRfJVhfVjLTLAZQLDDH83FFpCA3EKD22aiuEhHShwZFD34g3kqbEQiL" ], "script": "base64:AAIFAAAAAAAAACgIAhIFCgMICAgSABIDCgEIEgMKAQgSAwoBARIGCgQBAQEBEgQKAgEBAAAAPAAAAAAIUFJJQ0VMRVQAAAAAAAAPQkAAAAAACU1VTFRTQ0FMRQAAAAAAAAAACAAAAAALRVVMRVJOVU1CRVIAAAAAABAzxNYAAAAABnNjYWxlNgAAAAAAAA9CQAAAAAAMc2NhbGU2QmlnSW50CQABNgAAAAEAAAAAAAAPQkAAAAAABnNjYWxlOAAAAAAABfXhAAAAAAAMc2NhbGU4QmlnSW50CQABNgAAAAEAAAAAAAX14QAAAAAAB3NjYWxlMTIAAAAA6NSlEAAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwEAAAASa2V5TmV1dHJpbm9BZGRyZXNzAAAAAAIAAAAdJXMlc19fY29uZmlnX19uZXV0cmlub0FkZHJlc3MBAAAAEmtleU5ldXRyaW5vQXNzZXRJZAAAAAACAAAAEW5ldXRyaW5vX2Fzc2V0X2lkAQAAAB1rZXlMaXF1aWRhdGlvbkNvbnRyYWN0QWRkcmVzcw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sZi4AAAAAUmcndw==", "chainId": 84, "height": 1956239, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 636CdSY99X3LmJrb26DDpuVVQjYk6A66ThE9dSjpiZoF Next: 5Tx9hXk2YhPaxGXQMZV8RWqFsTXJiUTdqbvUcvVxuoyW Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let scale8 = 100000000 | |
15 | 15 | ||
16 | 16 | let scale8BigInt = toBigInt(100000000) | |
17 | + | ||
18 | + | let scale12 = 1000000000000 | |
17 | 19 | ||
18 | 20 | let scale18 = toBigInt(1000000000000000000) | |
19 | 21 | ||
92 | 94 | ||
93 | 95 | ||
94 | 96 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
97 | + | ||
98 | + | ||
99 | + | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP) | |
95 | 100 | ||
96 | 101 | ||
97 | 102 | func keyMinLockAmount () = "%s__minLockAmount" | |
198 | 203 | let maxNsbtSupply = asInt(neutrinoMetrics[10]) | |
199 | 204 | let nsbt2usdnPrice = asInt(prices[0]) | |
200 | 205 | let nsbt2wavesPrice = asInt(prices[1]) | |
201 | - | let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy()) | |
202 | - | let minNsbtsell = getIntegerValue(auctionContract, keyMinNsbtSell()) | |
203 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy), toString(minNsbtsell)], SEP)) | |
206 | + | let minWaves4NsbtBuy = getIntOrFail(auctionContract, keyMinWavesForNsbtBuy()) | |
207 | + | let minNsbtsell = getIntOrFail(auctionContract, keyMinNsbtSell()) | |
208 | + | let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount()) | |
209 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy), toString(minNsbtsell), toString(minNsbtLockAmt)], SEP)) | |
204 | 210 | } | |
205 | 211 | else throw("Strict value is not equal to itself.") | |
206 | 212 | } | |
218 | 224 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
219 | 225 | let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval()) | |
220 | 226 | let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval()) | |
221 | - | let $ | |
227 | + | let $t081579236 = if ((userAddressStr == "")) | |
222 | 228 | then $Tuple4(0, 0, 0, 0) | |
223 | 229 | else { | |
224 | 230 | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
239 | 245 | } | |
240 | 246 | else throw("Strict value is not equal to itself.") | |
241 | 247 | } | |
242 | - | let quickSwapUserSpent = $ | |
243 | - | let blocks2LimitReset = $ | |
244 | - | let maxUsdnLimit = $ | |
245 | - | let maxWavesLimit = $ | |
248 | + | let quickSwapUserSpent = $t081579236._1 | |
249 | + | let blocks2LimitReset = $t081579236._2 | |
250 | + | let maxUsdnLimit = $t081579236._3 | |
251 | + | let maxWavesLimit = $t081579236._4 | |
246 | 252 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP)) | |
247 | 253 | } | |
248 | 254 | ||
250 | 256 | ||
251 | 257 | @Callable(i) | |
252 | 258 | func gnsbtInfoREADONLY (userAddressStr) = { | |
253 | - | let gnsbtShare = 10000 | |
259 | + | let gnsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
260 | + | let gnsbtTotal = valueOrElse(getInteger(nsbtStakingContract, keyLockParamTotalAmount()), 0) | |
261 | + | let gnsbtShare = fraction((gnsbtAmount * 100), scale12, gnsbtTotal) | |
254 | 262 | let claimedTotalInUsdn = 10000 | |
255 | 263 | let claimedUsdn = 10000 | |
256 | 264 | let claimedWaves = 10000 | |
257 | 265 | let unclaimedTotalInUsdn = 10000 | |
258 | 266 | let unclaimedUsdn = 10000 | |
259 | 267 | let unclaimedWaves = 10000 | |
260 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP)) | |
268 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP)) | |
261 | 269 | } | |
262 | 270 | ||
263 | 271 | ||
295 | 303 | ||
296 | 304 | ||
297 | 305 | @Callable(i) | |
298 | - | func minStakedAmountREADONLY () = $Tuple2(nil, makeString(["%d", toString(getIntOrFail(nsbtStakingContract, keyMinLockAmount()))], SEP)) | |
299 | - | ||
300 | - | ||
301 | - | ||
302 | - | @Callable(i) | |
303 | 306 | func mergedStakeREADONLY (amount1,height1,amount2,height2) = { | |
304 | 307 | let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil)) | |
305 | 308 | if ((h == h)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PRICELET = 1000000 | |
5 | 5 | ||
6 | 6 | let MULTSCALE = 8 | |
7 | 7 | ||
8 | 8 | let EULERNUMBER = 271828182 | |
9 | 9 | ||
10 | 10 | let scale6 = 1000000 | |
11 | 11 | ||
12 | 12 | let scale6BigInt = toBigInt(1000000) | |
13 | 13 | ||
14 | 14 | let scale8 = 100000000 | |
15 | 15 | ||
16 | 16 | let scale8BigInt = toBigInt(100000000) | |
17 | + | ||
18 | + | let scale12 = 1000000000000 | |
17 | 19 | ||
18 | 20 | let scale18 = toBigInt(1000000000000000000) | |
19 | 21 | ||
20 | 22 | let SEP = "__" | |
21 | 23 | ||
22 | 24 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
23 | 25 | ||
24 | 26 | ||
25 | 27 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
26 | 28 | ||
27 | 29 | ||
28 | 30 | func keyLiquidationContractAddress () = "liquidation_contract" | |
29 | 31 | ||
30 | 32 | ||
31 | 33 | func keyRPDContract () = "rpd_contract" | |
32 | 34 | ||
33 | 35 | ||
34 | 36 | func keyAuctionContract () = "auction_contract" | |
35 | 37 | ||
36 | 38 | ||
37 | 39 | func keyContolContract () = "control_contract" | |
38 | 40 | ||
39 | 41 | ||
40 | 42 | func keyBondAssetId () = "bond_asset_id" | |
41 | 43 | ||
42 | 44 | ||
43 | 45 | func keyBalanceLocked () = "balance_lock_" | |
44 | 46 | ||
45 | 47 | ||
46 | 48 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
47 | 49 | ||
48 | 50 | ||
49 | 51 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
50 | 52 | ||
51 | 53 | ||
52 | 54 | func keyMinWavesSwapAmount () = "min_waves_swap_amount" | |
53 | 55 | ||
54 | 56 | ||
55 | 57 | func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount" | |
56 | 58 | ||
57 | 59 | ||
58 | 60 | func keyWavesOutFeePart () = "wavesOut_swap_feePart" | |
59 | 61 | ||
60 | 62 | ||
61 | 63 | func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart" | |
62 | 64 | ||
63 | 65 | ||
64 | 66 | func keyNsbtLockContract () = "%s__nsbtLockContract" | |
65 | 67 | ||
66 | 68 | ||
67 | 69 | func keyMathContract () = "%s__mathContract" | |
68 | 70 | ||
69 | 71 | ||
70 | 72 | func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration" | |
71 | 73 | ||
72 | 74 | ||
73 | 75 | func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP) | |
74 | 76 | ||
75 | 77 | ||
76 | 78 | func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP) | |
77 | 79 | ||
78 | 80 | ||
79 | 81 | func keyBalanceWavesLockInterval () = "balance_waves_lock_interval" | |
80 | 82 | ||
81 | 83 | ||
82 | 84 | func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval" | |
83 | 85 | ||
84 | 86 | ||
85 | 87 | func keySwapsTimeframe () = "swaps_timeframe" | |
86 | 88 | ||
87 | 89 | ||
88 | 90 | func keyPrice () = "price" | |
89 | 91 | ||
90 | 92 | ||
91 | 93 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP) | |
92 | 94 | ||
93 | 95 | ||
94 | 96 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
97 | + | ||
98 | + | ||
99 | + | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP) | |
95 | 100 | ||
96 | 101 | ||
97 | 102 | func keyMinLockAmount () = "%s__minLockAmount" | |
98 | 103 | ||
99 | 104 | ||
100 | 105 | func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy" | |
101 | 106 | ||
102 | 107 | ||
103 | 108 | func keyMinNsbtSell () = "min_nsbt_sell" | |
104 | 109 | ||
105 | 110 | ||
106 | 111 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
107 | 112 | ||
108 | 113 | ||
109 | 114 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
110 | 115 | ||
111 | 116 | ||
112 | 117 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
113 | 118 | ||
114 | 119 | ||
115 | 120 | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6) | |
116 | 121 | ||
117 | 122 | ||
118 | 123 | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8) | |
119 | 124 | ||
120 | 125 | ||
121 | 126 | func asAnyList (val) = match val { | |
122 | 127 | case valAnyList: List[Any] => | |
123 | 128 | valAnyList | |
124 | 129 | case _ => | |
125 | 130 | throw("fail to cast into List[Any]") | |
126 | 131 | } | |
127 | 132 | ||
128 | 133 | ||
129 | 134 | func asInt (val) = match val { | |
130 | 135 | case valInt: Int => | |
131 | 136 | valInt | |
132 | 137 | case _ => | |
133 | 138 | throw("fail to cast into Int") | |
134 | 139 | } | |
135 | 140 | ||
136 | 141 | ||
137 | 142 | func asString (val) = match val { | |
138 | 143 | case valStr: String => | |
139 | 144 | valStr | |
140 | 145 | case _ => | |
141 | 146 | throw("fail to cast into String") | |
142 | 147 | } | |
143 | 148 | ||
144 | 149 | ||
145 | 150 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
146 | 151 | ||
147 | 152 | ||
148 | 153 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
149 | 154 | ||
150 | 155 | ||
151 | 156 | let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress())) | |
152 | 157 | ||
153 | 158 | let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract())) | |
154 | 159 | ||
155 | 160 | let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract())) | |
156 | 161 | ||
157 | 162 | let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress()) | |
158 | 163 | ||
159 | 164 | let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract()) | |
160 | 165 | ||
161 | 166 | let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract())) | |
162 | 167 | ||
163 | 168 | let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract())) | |
164 | 169 | ||
165 | 170 | let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
166 | 171 | ||
167 | 172 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
168 | 173 | ||
169 | 174 | let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId()) | |
170 | 175 | ||
171 | 176 | let nsbtAssetId = fromBase58String(nsbtAssetIdStr) | |
172 | 177 | ||
173 | 178 | @Callable(i) | |
174 | 179 | func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this)) | |
175 | 180 | then throw("not authorized") | |
176 | 181 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)] | |
177 | 182 | ||
178 | 183 | ||
179 | 184 | ||
180 | 185 | @Callable(i) | |
181 | 186 | func neutrinoStatsREADONLY () = { | |
182 | 187 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil)) | |
183 | 188 | if ((neutrinoMetrics == neutrinoMetrics)) | |
184 | 189 | then { | |
185 | 190 | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH", nil, nil)) | |
186 | 191 | if ((prices == prices)) | |
187 | 192 | then { | |
188 | 193 | let currentPrice = asInt(neutrinoMetrics[0]) | |
189 | 194 | let neutrinoLockedBalance = asInt(neutrinoMetrics[1]) | |
190 | 195 | let wavesLockedBalance = asInt(neutrinoMetrics[2]) | |
191 | 196 | let reservesInWaves = asInt(neutrinoMetrics[3]) | |
192 | 197 | let reservesInUsdn = asInt(neutrinoMetrics[4]) | |
193 | 198 | let neutrinoSupply = asInt(neutrinoMetrics[5]) | |
194 | 199 | let surplus = asInt(neutrinoMetrics[6]) | |
195 | 200 | let surplusPercent = asInt(neutrinoMetrics[7]) | |
196 | 201 | let BR = asInt(neutrinoMetrics[8]) | |
197 | 202 | let nsbtSupply = asInt(neutrinoMetrics[9]) | |
198 | 203 | let maxNsbtSupply = asInt(neutrinoMetrics[10]) | |
199 | 204 | let nsbt2usdnPrice = asInt(prices[0]) | |
200 | 205 | let nsbt2wavesPrice = asInt(prices[1]) | |
201 | - | let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy()) | |
202 | - | let minNsbtsell = getIntegerValue(auctionContract, keyMinNsbtSell()) | |
203 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy), toString(minNsbtsell)], SEP)) | |
206 | + | let minWaves4NsbtBuy = getIntOrFail(auctionContract, keyMinWavesForNsbtBuy()) | |
207 | + | let minNsbtsell = getIntOrFail(auctionContract, keyMinNsbtSell()) | |
208 | + | let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount()) | |
209 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy), toString(minNsbtsell), toString(minNsbtLockAmt)], SEP)) | |
204 | 210 | } | |
205 | 211 | else throw("Strict value is not equal to itself.") | |
206 | 212 | } | |
207 | 213 | else throw("Strict value is not equal to itself.") | |
208 | 214 | } | |
209 | 215 | ||
210 | 216 | ||
211 | 217 | ||
212 | 218 | @Callable(i) | |
213 | 219 | func swapInfoREADONLY (userAddressStr) = { | |
214 | 220 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
215 | 221 | let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount()) | |
216 | 222 | let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount()) | |
217 | 223 | let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart()) | |
218 | 224 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
219 | 225 | let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval()) | |
220 | 226 | let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval()) | |
221 | - | let $ | |
227 | + | let $t081579236 = if ((userAddressStr == "")) | |
222 | 228 | then $Tuple4(0, 0, 0, 0) | |
223 | 229 | else { | |
224 | 230 | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
225 | 231 | let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil)) | |
226 | 232 | if ((usdnLmtMax == usdnLmtMax)) | |
227 | 233 | then { | |
228 | 234 | let quickSwapResetBlocks = valueOrElse(getInteger(neutrinoContract, keySwapsTimeframe()), 1440) | |
229 | 235 | let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0) | |
230 | 236 | let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks) | |
231 | 237 | let quickSwapUserSpent = if (isNewQuickSwapPeriod) | |
232 | 238 | then 0 | |
233 | 239 | else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0) | |
234 | 240 | let blcks2LmtReset = if (isNewQuickSwapPeriod) | |
235 | 241 | then 0 | |
236 | 242 | else (quickSwapResetBlocks - (height - lastQuickSwapBlock)) | |
237 | 243 | let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice) | |
238 | 244 | $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax) | |
239 | 245 | } | |
240 | 246 | else throw("Strict value is not equal to itself.") | |
241 | 247 | } | |
242 | - | let quickSwapUserSpent = $ | |
243 | - | let blocks2LimitReset = $ | |
244 | - | let maxUsdnLimit = $ | |
245 | - | let maxWavesLimit = $ | |
248 | + | let quickSwapUserSpent = $t081579236._1 | |
249 | + | let blocks2LimitReset = $t081579236._2 | |
250 | + | let maxUsdnLimit = $t081579236._3 | |
251 | + | let maxWavesLimit = $t081579236._4 | |
246 | 252 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP)) | |
247 | 253 | } | |
248 | 254 | ||
249 | 255 | ||
250 | 256 | ||
251 | 257 | @Callable(i) | |
252 | 258 | func gnsbtInfoREADONLY (userAddressStr) = { | |
253 | - | let gnsbtShare = 10000 | |
259 | + | let gnsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
260 | + | let gnsbtTotal = valueOrElse(getInteger(nsbtStakingContract, keyLockParamTotalAmount()), 0) | |
261 | + | let gnsbtShare = fraction((gnsbtAmount * 100), scale12, gnsbtTotal) | |
254 | 262 | let claimedTotalInUsdn = 10000 | |
255 | 263 | let claimedUsdn = 10000 | |
256 | 264 | let claimedWaves = 10000 | |
257 | 265 | let unclaimedTotalInUsdn = 10000 | |
258 | 266 | let unclaimedUsdn = 10000 | |
259 | 267 | let unclaimedWaves = 10000 | |
260 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP)) | |
268 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP)) | |
261 | 269 | } | |
262 | 270 | ||
263 | 271 | ||
264 | 272 | ||
265 | 273 | @Callable(i) | |
266 | 274 | func buyNsbtREADONLY (wavesPay) = { | |
267 | 275 | let minWavesAmountNsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy()) | |
268 | 276 | if ((minWavesAmountNsbtBuy > wavesPay)) | |
269 | 277 | then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected")) | |
270 | 278 | else { | |
271 | 279 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil)) | |
272 | 280 | if ((neutrinoMetrics == neutrinoMetrics)) | |
273 | 281 | then { | |
274 | 282 | let currentPrice = asInt(neutrinoMetrics[0]) | |
275 | 283 | let reserve = asInt(neutrinoMetrics[3]) | |
276 | 284 | let neutrinoSupply = asInt(neutrinoMetrics[5]) | |
277 | 285 | let nsbtSupply = asInt(neutrinoMetrics[9]) | |
278 | 286 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
279 | 287 | let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPay], nil)) | |
280 | 288 | if ((curveResult == curveResult)) | |
281 | 289 | then { | |
282 | 290 | let nsbtAmount = asInt(curveResult[0]) | |
283 | 291 | if ((0 >= nsbtAmount)) | |
284 | 292 | then throw("nsbtAmount <= 0") | |
285 | 293 | else if ((wavesPay > (nsbtAmount * 9223372))) | |
286 | 294 | then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount))) | |
287 | 295 | else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP)) | |
288 | 296 | } | |
289 | 297 | else throw("Strict value is not equal to itself.") | |
290 | 298 | } | |
291 | 299 | else throw("Strict value is not equal to itself.") | |
292 | 300 | } | |
293 | 301 | } | |
294 | 302 | ||
295 | 303 | ||
296 | 304 | ||
297 | 305 | @Callable(i) | |
298 | - | func minStakedAmountREADONLY () = $Tuple2(nil, makeString(["%d", toString(getIntOrFail(nsbtStakingContract, keyMinLockAmount()))], SEP)) | |
299 | - | ||
300 | - | ||
301 | - | ||
302 | - | @Callable(i) | |
303 | 306 | func mergedStakeREADONLY (amount1,height1,amount2,height2) = { | |
304 | 307 | let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil)) | |
305 | 308 | if ((h == h)) | |
306 | 309 | then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP)) | |
307 | 310 | else throw("Strict value is not equal to itself.") | |
308 | 311 | } | |
309 | 312 | ||
310 | 313 | ||
311 | 314 | ||
312 | 315 | @Callable(i) | |
313 | 316 | func unstakeComissionAmountREADONLY (amount,startHeight) = { | |
314 | 317 | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil)) | |
315 | 318 | if ((a == a)) | |
316 | 319 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
317 | 320 | else throw("Strict value is not equal to itself.") | |
318 | 321 | } | |
319 | 322 | ||
320 | 323 |
github/deemru/w8io/026f985 71.02 ms ◑