tx · 9N9ZqKs5z1unpKR3LC1mX1czcDNU8jCeD4BAX568wHXn 3Mq63YubY7UKJEobhDuXfsnXaPDJZT1fDhx: -0.01400000 Waves 2021.12.29 20:02 [1855780] smart account 3Mq63YubY7UKJEobhDuXfsnXaPDJZT1fDhx > SELF 0.00000000 Waves
{ "type": 13, "id": "9N9ZqKs5z1unpKR3LC1mX1czcDNU8jCeD4BAX568wHXn", "fee": 1400000, "feeAssetId": null, "timestamp": 1640797330876, "version": 2, "chainId": 84, "sender": "3Mq63YubY7UKJEobhDuXfsnXaPDJZT1fDhx", "senderPublicKey": "HXfVyeXgXUtHD3uSP6yjsk6JQcTwmU9qQTvhXzFpPw2T", "proofs": [ "ed62VUWp1tZjamUbhMgLv4Z7tcwYkDRY2caPnJ61EzWBLRtz3U1jhj3WKUEwZUTCFWmsKMQydL623jpEZD3Nr6R", "2K9jmAjVpKdBE8xG7Bgr4sufD4QQdtSERJwnMAT9iEXfTJPUw8o1QwvCP48xPNMu59qnJg7BA64mEo8JF1T3BJfK" ], "script": "base64:AAIFAAAAAAAADsIIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgMKAQESBQoDBAEIEgAaFAoBQRIPa2V5QWRtaW5QdWJLZXkyGhQKAUISD2tleUFkbWluUHViS2V5MxoLCgFDEgZvcmFjbGUaEAoBRBILZ2V0QWRtaW5QdWIaEAoBRRILa2V5QWRtaW5QdWIaDAoBRhIHJG1hdGNoMBoLCgFHEgZzdHJpbmcaDAoBSBIHbm90aGluZxoRCgFJEgxhZG1pblB1YktleTEaEQoBShIMYWRtaW5QdWJLZXkyGhEKAUsSDGFkbWluUHViS2V5MxoZCgFMEhRhZG1pblB1YktleVN0YXJ0U3RvcBoXCgFNEhJhZG1pblB1YktleVN0YWtpbmcaEgoBThINd2FsbGV0QWRkcmVzcxoSCgFPEg12b3RpbmdBZGRyZXNzGgkKAVASBFVTRE4aCQoBURIETlNCVBoJCgFSEgRFVVJOGhIKAVMSDX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3UAAAAEZEFwcAUAAAABVwkAAAAAAAACCAUAAAACY3UAAAAIZnVuY3Rpb24CAAAACGV4Y2hhbmdlBwkAAAAAAAACBQAAAAJhZQUAAAABUQcGAwMJAAAAAAAAAgUAAAACYWYFAAAAAVEJAAAAAAAAAgkAAZAAAAABCAUAAAACY3UAAAAIcGF5bWVudHMAAAAAAAAAAAEHCQAAAAAAAAIICQABkQAAAAIIBQAAAAJjdQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAdhc3NldElkBQAAAAFQBwQAAAACY0cDAwMJAAH0AAAAAwgFAAAAAmN4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACY3gAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAFJBgkAAfQAAAADCAUAAAACY3gAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJjeAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAUoGCQAB9AAAAAMIBQAAAAJjeAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmN4AAAABnByb29mcwAAAAAAAAAAAAUAAAABSwYJAAH0AAAAAwgFAAAAAmN4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACY3gAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAFNAwMDAwUAAAACY0QGBQAAAAJjRQYFAAAAAmNGBQAAAAJjRwcGBQAAAAJjegUAAAACY3on8mbz", "height": 1855780, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3RohkzdFAr8vMGFcNWgmXdQa4A8v3dQFsJqi1dSxVkir Next: none Diff:
Old | New | Differences | |
---|---|---|---|
40 | 40 | let kPeriodLength = "period_length" | |
41 | 41 | ||
42 | 42 | let kStartHeight = "start_height" | |
43 | - | ||
44 | - | let kFirstHarvestHeight = "first_harvest_height" | |
45 | 43 | ||
46 | 44 | let keyUSDNNSBTAddress = "staking_usdnnsbt_address" | |
47 | 45 | ||
86 | 84 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
87 | 85 | ||
88 | 86 | let NSBT = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9' | |
89 | - | ||
90 | - | let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
91 | 87 | ||
92 | 88 | let EURN = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA' | |
93 | 89 | ||
161 | 157 | ||
162 | 158 | let slippageToleranceDelimiter = 1000 | |
163 | 159 | ||
164 | - | let scaleValue8Digits = 8 | |
165 | - | ||
166 | 160 | func accountBalance (assetId) = match assetId { | |
167 | 161 | case id: ByteVector => | |
168 | 162 | assetBalance(this, id) | |
204 | 198 | let assetInitA = getIntegerValue(this, keyBalanceInitA) | |
205 | 199 | ||
206 | 200 | let assetInitB = getIntegerValue(this, keyBalanceInitB) | |
207 | - | ||
208 | - | let availableBalanceA = (balanceA - stakedAmountA) | |
209 | - | ||
210 | - | let availableBalanceB = (balanceB - stakedAmountB) | |
211 | 201 | ||
212 | 202 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
213 | 203 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "1.0.0" | |
5 | 5 | ||
6 | 6 | let keyVersion = "version" | |
7 | 7 | ||
8 | 8 | let keyActive = "active" | |
9 | 9 | ||
10 | 10 | let keyAssetIdA = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let keyAssetIdB = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let keyBalanceA = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let keyBalanceB = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let keyBalanceInitA = "A_asset_init" | |
19 | 19 | ||
20 | 20 | let keyBalanceInitB = "B_asset_init" | |
21 | 21 | ||
22 | 22 | let keyShareAssetId = "share_asset_id" | |
23 | 23 | ||
24 | 24 | let keyShareAssetSupply = "share_asset_supply" | |
25 | 25 | ||
26 | 26 | let keyCommission = "commission" | |
27 | 27 | ||
28 | 28 | let keyCommissionScaleDelimiter = "commission_scale_delimiter" | |
29 | 29 | ||
30 | 30 | let keyCause = "shutdown_cause" | |
31 | 31 | ||
32 | 32 | let keyFirstHarvest = "first_harvest" | |
33 | 33 | ||
34 | 34 | let keyFirstHarvestHeight = "first_harvest_height" | |
35 | 35 | ||
36 | 36 | let kShareLimit = "share_limit_on_first_harvest" | |
37 | 37 | ||
38 | 38 | let kBasePeriod = "base_period" | |
39 | 39 | ||
40 | 40 | let kPeriodLength = "period_length" | |
41 | 41 | ||
42 | 42 | let kStartHeight = "start_height" | |
43 | - | ||
44 | - | let kFirstHarvestHeight = "first_harvest_height" | |
45 | 43 | ||
46 | 44 | let keyUSDNNSBTAddress = "staking_usdnnsbt_address" | |
47 | 45 | ||
48 | 46 | let keyEURNAddress = "staking_eurn_address" | |
49 | 47 | ||
50 | 48 | let keyLeasingPool = "leasing_address" | |
51 | 49 | ||
52 | 50 | let keyLeasingAmount = "leasing_amount" | |
53 | 51 | ||
54 | 52 | let keyLeasingId = "leasing_id" | |
55 | 53 | ||
56 | 54 | let keyAdminPubKey1 = "admin_pub_1" | |
57 | 55 | ||
58 | 56 | let keyAdminPubKey2 = "admin_pub_2" | |
59 | 57 | ||
60 | 58 | let keyAdminPubKey3 = "admin_pub_3" | |
61 | 59 | ||
62 | 60 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
63 | 61 | ||
64 | 62 | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
65 | 63 | case string: String => | |
66 | 64 | fromBase58String(string) | |
67 | 65 | case nothing => | |
68 | 66 | throw("Admin public key is empty") | |
69 | 67 | } | |
70 | 68 | ||
71 | 69 | ||
72 | 70 | let adminPubKey1 = getAdminPub(keyAdminPubKey1) | |
73 | 71 | ||
74 | 72 | let adminPubKey2 = getAdminPub(keyAdminPubKey2) | |
75 | 73 | ||
76 | 74 | let adminPubKey3 = getAdminPub(keyAdminPubKey3) | |
77 | 75 | ||
78 | 76 | let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
79 | 77 | ||
80 | 78 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
81 | 79 | ||
82 | 80 | let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
83 | 81 | ||
84 | 82 | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
85 | 83 | ||
86 | 84 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
87 | 85 | ||
88 | 86 | let NSBT = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9' | |
89 | - | ||
90 | - | let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
91 | 87 | ||
92 | 88 | let EURN = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA' | |
93 | 89 | ||
94 | 90 | let stakingAssets = ["WAVES", toBase58String(USDN), toBase58String(NSBT), toBase58String(EURN)] | |
95 | 91 | ||
96 | 92 | let stakingUSDNNSBTAddress = Address(fromBase58String(valueOrErrorMessage(getString(oracle, keyUSDNNSBTAddress), "no usdn staking address"))) | |
97 | 93 | ||
98 | 94 | let stakingEURNAddress = Address(fromBase58String(valueOrErrorMessage(getString(oracle, keyEURNAddress), "no usdn staking address"))) | |
99 | 95 | ||
100 | 96 | let USDNToWavesExchanger = Address(base58'3N8PGkzXhbtTvEwEQTtE2xiTJmsDEQ9XfoZ') | |
101 | 97 | ||
102 | 98 | let USDNToNSBTExchanger = Address(base58'3MqW1t2cxdYy2emEMk3YtZkRwQPhHaTfWRe') | |
103 | 99 | ||
104 | 100 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
105 | 101 | ||
106 | 102 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
107 | 103 | ||
108 | 104 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
109 | 105 | ||
110 | 106 | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
111 | 107 | ||
112 | 108 | let active = getBooleanValue(this, keyActive) | |
113 | 109 | ||
114 | 110 | let strAssetIdA = getStringValue(this, keyAssetIdA) | |
115 | 111 | ||
116 | 112 | let strAssetIdB = getStringValue(this, keyAssetIdB) | |
117 | 113 | ||
118 | 114 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
119 | 115 | then unit | |
120 | 116 | else fromBase58String(strAssetIdA) | |
121 | 117 | ||
122 | 118 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
123 | 119 | then unit | |
124 | 120 | else fromBase58String(strAssetIdB) | |
125 | 121 | ||
126 | 122 | let assetNameA = match assetIdA { | |
127 | 123 | case id: ByteVector => | |
128 | 124 | value(assetInfo(id)).name | |
129 | 125 | case waves: Unit => | |
130 | 126 | "WAVES" | |
131 | 127 | case _ => | |
132 | 128 | throw("Match error") | |
133 | 129 | } | |
134 | 130 | ||
135 | 131 | let assetNameB = match assetIdB { | |
136 | 132 | case id: ByteVector => | |
137 | 133 | value(assetInfo(id)).name | |
138 | 134 | case waves: Unit => | |
139 | 135 | "WAVES" | |
140 | 136 | case _ => | |
141 | 137 | throw("Match error") | |
142 | 138 | } | |
143 | 139 | ||
144 | 140 | let balanceA = getIntegerValue(this, keyBalanceA) | |
145 | 141 | ||
146 | 142 | let balanceB = getIntegerValue(this, keyBalanceB) | |
147 | 143 | ||
148 | 144 | let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId)) | |
149 | 145 | ||
150 | 146 | let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply) | |
151 | 147 | ||
152 | 148 | let commission = 3000 | |
153 | 149 | ||
154 | 150 | let commissionGovernance = 1200 | |
155 | 151 | ||
156 | 152 | let commissionScaleDelimiter = 1000000 | |
157 | 153 | ||
158 | 154 | let scaleValue3 = 1000 | |
159 | 155 | ||
160 | 156 | let scaleValue8 = 100000000 | |
161 | 157 | ||
162 | 158 | let slippageToleranceDelimiter = 1000 | |
163 | 159 | ||
164 | - | let scaleValue8Digits = 8 | |
165 | - | ||
166 | 160 | func accountBalance (assetId) = match assetId { | |
167 | 161 | case id: ByteVector => | |
168 | 162 | assetBalance(this, id) | |
169 | 163 | case waves: Unit => | |
170 | 164 | wavesBalance(this).available | |
171 | 165 | case _ => | |
172 | 166 | throw("Match error") | |
173 | 167 | } | |
174 | 168 | ||
175 | 169 | ||
176 | 170 | func stakedAmount (assetId) = { | |
177 | 171 | let stakedAmountCalculated = match assetId { | |
178 | 172 | case aId: ByteVector => | |
179 | 173 | if (if ((aId == USDN)) | |
180 | 174 | then true | |
181 | 175 | else (aId == NSBT)) | |
182 | 176 | then getInteger(stakingUSDNNSBTAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
183 | 177 | else if ((aId == EURN)) | |
184 | 178 | then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(this))) | |
185 | 179 | else 0 | |
186 | 180 | case _: Unit => | |
187 | 181 | valueOrElse(getInteger(this, keyLeasingAmount), 0) | |
188 | 182 | case _ => | |
189 | 183 | throw("Match error") | |
190 | 184 | } | |
191 | 185 | match stakedAmountCalculated { | |
192 | 186 | case i: Int => | |
193 | 187 | i | |
194 | 188 | case _ => | |
195 | 189 | 0 | |
196 | 190 | } | |
197 | 191 | } | |
198 | 192 | ||
199 | 193 | ||
200 | 194 | let stakedAmountA = stakedAmount(assetIdA) | |
201 | 195 | ||
202 | 196 | let stakedAmountB = stakedAmount(assetIdB) | |
203 | 197 | ||
204 | 198 | let assetInitA = getIntegerValue(this, keyBalanceInitA) | |
205 | 199 | ||
206 | 200 | let assetInitB = getIntegerValue(this, keyBalanceInitB) | |
207 | - | ||
208 | - | let availableBalanceA = (balanceA - stakedAmountA) | |
209 | - | ||
210 | - | let availableBalanceB = (balanceB - stakedAmountB) | |
211 | 201 | ||
212 | 202 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
213 | 203 | ||
214 | 204 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB) | |
215 | 205 | ||
216 | 206 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
217 | 207 | then (accountBalanceWithStakedB >= balanceB) | |
218 | 208 | else false | |
219 | 209 | ||
220 | 210 | func getAssetInfo (assetId) = match assetId { | |
221 | 211 | case id: ByteVector => | |
222 | 212 | let stringId = toBase58String(id) | |
223 | 213 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
224 | 214 | $Tuple3(stringId, info.name, info.decimals) | |
225 | 215 | case waves: Unit => | |
226 | 216 | $Tuple3("WAVES", "WAVES", 8) | |
227 | 217 | case _ => | |
228 | 218 | throw("Match error") | |
229 | 219 | } | |
230 | 220 | ||
231 | 221 | ||
232 | 222 | func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES")) | |
233 | 223 | then $Tuple3("WAVES", "WAVES", 8) | |
234 | 224 | else { | |
235 | 225 | let stringId = assetStr | |
236 | 226 | let id = fromBase58String(assetStr) | |
237 | 227 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
238 | 228 | $Tuple3(stringId, info.name, info.decimals) | |
239 | 229 | } | |
240 | 230 | ||
241 | 231 | ||
242 | 232 | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
243 | 233 | ||
244 | 234 | ||
245 | 235 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
246 | 236 | then if ((assetId == USDN)) | |
247 | 237 | then $Tuple2("lockNeutrino", stakingUSDNNSBTAddress) | |
248 | 238 | else if ((assetId == NSBT)) | |
249 | 239 | then $Tuple2("lockNsbt", stakingUSDNNSBTAddress) | |
250 | 240 | else $Tuple2("startStaking", stakingEURNAddress) | |
251 | 241 | else if ((assetId == USDN)) | |
252 | 242 | then $Tuple2("unlockNeutrino", stakingUSDNNSBTAddress) | |
253 | 243 | else if ((assetId == NSBT)) | |
254 | 244 | then $Tuple2("unlockNsbt", stakingUSDNNSBTAddress) | |
255 | 245 | else $Tuple2("stopStaking", stakingEURNAddress) | |
256 | 246 | ||
257 | 247 | ||
258 | 248 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
259 | 249 | then { | |
260 | 250 | let $t069216987 = calcStakingFuncAndAddres(stake, assetId) | |
261 | 251 | let call = $t069216987._1 | |
262 | 252 | let stakingAddr = $t069216987._2 | |
263 | 253 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
264 | 254 | } | |
265 | 255 | else { | |
266 | 256 | let $t070737139 = calcStakingFuncAndAddres(stake, assetId) | |
267 | 257 | let call = $t070737139._1 | |
268 | 258 | let stakingAddr = $t070737139._2 | |
269 | 259 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
270 | 260 | } | |
271 | 261 | ||
272 | 262 | ||
273 | 263 | func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo) = { | |
274 | 264 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
275 | 265 | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
276 | 266 | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
277 | 267 | if ((minAmountToReceive > amountWithFee)) | |
278 | 268 | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
279 | 269 | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
280 | 270 | } | |
281 | 271 | ||
282 | 272 | ||
283 | 273 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceWithStakedA)) + " ") + assetNameA) + ", ") + toString(accountBalanceWithStakedB)) + " ") + assetNameB) + ". State: ") + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB)) | |
284 | 274 | ||
285 | 275 | ||
286 | 276 | func isActive () = if (active) | |
287 | 277 | then unit | |
288 | 278 | else throw("DApp is inactive at this moment") | |
289 | 279 | ||
290 | 280 | ||
291 | 281 | @Callable(i) | |
292 | 282 | func init (firstHarvest) = { | |
293 | 283 | let $t083098386 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
294 | 284 | let pmtAmountA = $t083098386._1 | |
295 | 285 | let pmtAssetIdA = $t083098386._2 | |
296 | 286 | let $t083918468 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
297 | 287 | let pmtAmountB = $t083918468._1 | |
298 | 288 | let pmtAssetIdB = $t083918468._2 | |
299 | 289 | let $t084738550 = getAssetInfo(pmtAssetIdA) | |
300 | 290 | let pmtStrAssetIdA = $t084738550._1 | |
301 | 291 | let pmtAssetNameA = $t084738550._2 | |
302 | 292 | let pmtDecimalsA = $t084738550._3 | |
303 | 293 | let $t085558632 = getAssetInfo(pmtAssetIdB) | |
304 | 294 | let pmtStrAssetIdB = $t085558632._1 | |
305 | 295 | let pmtAssetNameB = $t085558632._2 | |
306 | 296 | let pmtDecimalsB = $t085558632._3 | |
307 | 297 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
308 | 298 | then throw("Only admin can call this function") | |
309 | 299 | else if (isDefined(getBoolean(this, keyActive))) | |
310 | 300 | then throw("DApp is already active") | |
311 | 301 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
312 | 302 | then throw("Assets must be different") | |
313 | 303 | else { | |
314 | 304 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
315 | 305 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
316 | 306 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
317 | 307 | let arg1 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN) | |
318 | 308 | let arg2 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN) | |
319 | 309 | let arg3 = pow(10, 0, shareDecimals, 0, 0, DOWN) | |
320 | 310 | let shareInitialSupply = fraction(arg1, arg2, arg3) | |
321 | 311 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
322 | 312 | let shareIssueId = calculateAssetId(shareIssue) | |
323 | 313 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
324 | 314 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
325 | 315 | else 0 | |
326 | 316 | if ((stake1 == stake1)) | |
327 | 317 | then { | |
328 | 318 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
329 | 319 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
330 | 320 | else 0 | |
331 | 321 | if ((stake2 == stake2)) | |
332 | 322 | then { | |
333 | 323 | let baseEntry = [StringEntry(keyVersion, version), BooleanEntry(keyActive, true), StringEntry(keyAssetIdA, pmtStrAssetIdA), StringEntry(keyAssetIdB, pmtStrAssetIdB), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyCommission, commission), IntegerEntry(keyCommissionScaleDelimiter, commissionScaleDelimiter), shareIssue, StringEntry(keyShareAssetId, toBase58String(shareIssueId)), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
334 | 324 | if (firstHarvest) | |
335 | 325 | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
336 | 326 | else baseEntry | |
337 | 327 | } | |
338 | 328 | else throw("Strict value is not equal to itself.") | |
339 | 329 | } | |
340 | 330 | else throw("Strict value is not equal to itself.") | |
341 | 331 | } | |
342 | 332 | } | |
343 | 333 | ||
344 | 334 | ||
345 | 335 | ||
346 | 336 | @Callable(i) | |
347 | 337 | func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = { | |
348 | 338 | let $t01122111308 = getAssetInfoFromString(strAssetIdA) | |
349 | 339 | let pmtStrAssetIdA = $t01122111308._1 | |
350 | 340 | let pmtAssetNameA = $t01122111308._2 | |
351 | 341 | let pmtDecimalsA = $t01122111308._3 | |
352 | 342 | let $t01131311400 = getAssetInfoFromString(strAssetIdB) | |
353 | 343 | let pmtStrAssetIdB = $t01131311400._1 | |
354 | 344 | let pmtAssetNameB = $t01131311400._2 | |
355 | 345 | let pmtDecimalsB = $t01131311400._3 | |
356 | 346 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
357 | 347 | then throw("Only admin can call this function") | |
358 | 348 | else if (isDefined(getBoolean(this, keyActive))) | |
359 | 349 | then throw("DApp is already active") | |
360 | 350 | else if ((strAssetIdA == strAssetIdB)) | |
361 | 351 | then throw("Assets must be different") | |
362 | 352 | else { | |
363 | 353 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
364 | 354 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
365 | 355 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
366 | 356 | let shareInitialSupply = 0 | |
367 | 357 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
368 | 358 | let shareIssueId = calculateAssetId(shareIssue) | |
369 | 359 | let baseEntry = [StringEntry(keyVersion, version), BooleanEntry(keyActive, true), StringEntry(keyAssetIdA, pmtStrAssetIdA), StringEntry(keyAssetIdB, pmtStrAssetIdB), IntegerEntry(keyBalanceInitA, amtAssetA), IntegerEntry(keyBalanceInitB, amtAssetB), IntegerEntry(keyBalanceA, 0), IntegerEntry(keyBalanceB, 0), IntegerEntry(keyCommission, commission), IntegerEntry(keyCommissionScaleDelimiter, commissionScaleDelimiter), shareIssue, StringEntry(keyShareAssetId, toBase58String(shareIssueId)), IntegerEntry(keyShareAssetSupply, shareInitialSupply)] | |
370 | 360 | if (firstHarvest) | |
371 | 361 | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
372 | 362 | else baseEntry | |
373 | 363 | } | |
374 | 364 | } | |
375 | 365 | ||
376 | 366 | ||
377 | 367 | ||
378 | 368 | @Callable(i) | |
379 | 369 | func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
380 | 370 | then throw("Only admin can call this function") | |
381 | 371 | else [IntegerEntry(kShareLimit, shareLimit)]) | |
382 | 372 | ||
383 | 373 | ||
384 | 374 | ||
385 | 375 | @Callable(i) | |
386 | 376 | func replenishWithTwoTokens (slippageTolerance) = valueOrElse(isActive(), { | |
387 | 377 | let pmtAssetIdA = i.payments[0].assetId | |
388 | 378 | let pmtAssetIdB = i.payments[1].assetId | |
389 | 379 | let pmtAmountA = i.payments[0].amount | |
390 | 380 | let pmtAmountB = i.payments[1].amount | |
391 | 381 | let $t01386813945 = getAssetInfo(pmtAssetIdA) | |
392 | 382 | let pmtStrAssetIdA = $t01386813945._1 | |
393 | 383 | let pmtAssetNameA = $t01386813945._2 | |
394 | 384 | let pmtDecimalsA = $t01386813945._3 | |
395 | 385 | let $t01395014027 = getAssetInfo(pmtAssetIdB) | |
396 | 386 | let pmtStrAssetIdB = $t01395014027._1 | |
397 | 387 | let pmtAssetNameB = $t01395014027._2 | |
398 | 388 | let pmtDecimalsB = $t01395014027._3 | |
399 | 389 | let inital = if (if ((balanceA == 0)) | |
400 | 390 | then (balanceB == 0) | |
401 | 391 | else false) | |
402 | 392 | then true | |
403 | 393 | else false | |
404 | 394 | let tokenRatio = if (inital) | |
405 | 395 | then fraction(fraction(assetInitA, scaleValue8, pmtAmountA), scaleValue3, fraction(assetInitB, scaleValue8, pmtAmountB)) | |
406 | 396 | else fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB)) | |
407 | 397 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
408 | 398 | let shareTokenToPayAmount = if (inital) | |
409 | 399 | then fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
410 | 400 | else fraction(min([fraction(pmtAmountA, scaleValue8, balanceA), fraction(pmtAmountB, scaleValue8, balanceB)]), shareAssetSupply, scaleValue8) | |
411 | 401 | if (if ((0 > slippageTolerance)) | |
412 | 402 | then true | |
413 | 403 | else (slippageTolerance > slippageToleranceDelimiter)) | |
414 | 404 | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
415 | 405 | else if ((size(i.payments) != 2)) | |
416 | 406 | then throw("Two attached assets expected") | |
417 | 407 | else if (if ((pmtAssetIdA != assetIdA)) | |
418 | 408 | then true | |
419 | 409 | else (pmtAssetIdB != assetIdB)) | |
420 | 410 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
421 | 411 | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
422 | 412 | then true | |
423 | 413 | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
424 | 414 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
425 | 415 | else if ((shareTokenToPayAmount == 0)) | |
426 | 416 | then throw("Too small amount to replenish") | |
427 | 417 | else if (!(hasEnoughBalance)) | |
428 | 418 | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
429 | 419 | else { | |
430 | 420 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
431 | 421 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
432 | 422 | else 0 | |
433 | 423 | if ((stake1 == stake1)) | |
434 | 424 | then { | |
435 | 425 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
436 | 426 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
437 | 427 | else 0 | |
438 | 428 | if ((stake2 == stake2)) | |
439 | 429 | then [Reissue(shareAssetId, shareTokenToPayAmount, true), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyShareAssetSupply, shareTokenToPayAmount), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
440 | 430 | else throw("Strict value is not equal to itself.") | |
441 | 431 | } | |
442 | 432 | else throw("Strict value is not equal to itself.") | |
443 | 433 | } | |
444 | 434 | }) | |
445 | 435 | ||
446 | 436 | ||
447 | 437 | ||
448 | 438 | @Callable(i) | |
449 | 439 | func withdraw () = valueOrElse(isActive(), { | |
450 | 440 | let $t01679316868 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
451 | 441 | let pmtAmount = $t01679316868._1 | |
452 | 442 | let pmtAssetId = $t01679316868._2 | |
453 | 443 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
454 | 444 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
455 | 445 | if ((size(i.payments) != 1)) | |
456 | 446 | then throw("One attached payment expected") | |
457 | 447 | else if ((pmtAssetId != shareAssetId)) | |
458 | 448 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
459 | 449 | else if (!(hasEnoughBalance)) | |
460 | 450 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
461 | 451 | else { | |
462 | 452 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
463 | 453 | then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
464 | 454 | else 0 | |
465 | 455 | if ((stake1 == stake1)) | |
466 | 456 | then { | |
467 | 457 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
468 | 458 | then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
469 | 459 | else 0 | |
470 | 460 | if ((stake2 == stake2)) | |
471 | 461 | then [IntegerEntry(keyBalanceA, (balanceA - amountToPayA)), IntegerEntry(keyBalanceB, (balanceB - amountToPayB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply - pmtAmount)), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
472 | 462 | else throw("Strict value is not equal to itself.") | |
473 | 463 | } | |
474 | 464 | else throw("Strict value is not equal to itself.") | |
475 | 465 | } | |
476 | 466 | }) | |
477 | 467 | ||
478 | 468 | ||
479 | 469 | ||
480 | 470 | @Callable(i) | |
481 | 471 | func exchange (minAmountToReceive) = valueOrElse(isActive(), { | |
482 | 472 | let $t01817418249 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
483 | 473 | let pmtAmount = $t01817418249._1 | |
484 | 474 | let pmtAssetId = $t01817418249._2 | |
485 | 475 | if (if ((balanceA == 0)) | |
486 | 476 | then true | |
487 | 477 | else (balanceB == 0)) | |
488 | 478 | then throw("Can't exchange with zero balance") | |
489 | 479 | else if ((0 >= minAmountToReceive)) | |
490 | 480 | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
491 | 481 | else if ((size(i.payments) != 1)) | |
492 | 482 | then throw("One attached payment expected") | |
493 | 483 | else if (!(hasEnoughBalance)) | |
494 | 484 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
495 | 485 | else if ((pmtAssetId == assetIdA)) | |
496 | 486 | then { | |
497 | 487 | let assetIdSend = assetIdB | |
498 | 488 | let $t01880418926 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB) | |
499 | 489 | let amountWithoutFee = $t01880418926._1 | |
500 | 490 | let amountWithFee = $t01880418926._2 | |
501 | 491 | let governanceReward = $t01880418926._3 | |
502 | 492 | let newBalanceA = (balanceA + pmtAmount) | |
503 | 493 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
504 | 494 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
505 | 495 | then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdA], nil) | |
506 | 496 | else 0 | |
507 | 497 | if ((stake1 == stake1)) | |
508 | 498 | then { | |
509 | 499 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
510 | 500 | then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdB], nil) | |
511 | 501 | else 0 | |
512 | 502 | if ((stake2 == stake2)) | |
513 | 503 | then [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)] | |
514 | 504 | else throw("Strict value is not equal to itself.") | |
515 | 505 | } | |
516 | 506 | else throw("Strict value is not equal to itself.") | |
517 | 507 | } | |
518 | 508 | else if ((pmtAssetId == assetIdB)) | |
519 | 509 | then { | |
520 | 510 | let assetIdSend = assetIdA | |
521 | 511 | let $t01988120003 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA) | |
522 | 512 | let amountWithoutFee = $t01988120003._1 | |
523 | 513 | let amountWithFee = $t01988120003._2 | |
524 | 514 | let governanceReward = $t01988120003._3 | |
525 | 515 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
526 | 516 | let newBalanceB = (balanceB + pmtAmount) | |
527 | 517 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
528 | 518 | then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdA], nil) | |
529 | 519 | else 0 | |
530 | 520 | if ((stake1 == stake1)) | |
531 | 521 | then { | |
532 | 522 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
533 | 523 | then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdB], nil) | |
534 | 524 | else 0 | |
535 | 525 | if ((stake2 == stake2)) | |
536 | 526 | then [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)] | |
537 | 527 | else throw("Strict value is not equal to itself.") | |
538 | 528 | } | |
539 | 529 | else throw("Strict value is not equal to itself.") | |
540 | 530 | } | |
541 | 531 | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
542 | 532 | }) | |
543 | 533 | ||
544 | 534 | ||
545 | 535 | ||
546 | 536 | @Callable(i) | |
547 | 537 | func shutdown () = if (!(active)) | |
548 | 538 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
549 | 539 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
550 | 540 | then throw("Only admin can call this function") | |
551 | 541 | else suspend("Paused by admin") | |
552 | 542 | ||
553 | 543 | ||
554 | 544 | ||
555 | 545 | @Callable(i) | |
556 | 546 | func activate () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
557 | 547 | then throw("Only admin can call this function") | |
558 | 548 | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]) | |
559 | 549 | ||
560 | 550 | ||
561 | 551 | ||
562 | 552 | @Callable(i) | |
563 | 553 | func takeIntoAccountExtraFunds (amountLeave) = valueOrElse(isActive(), { | |
564 | 554 | let uncountableAmountEnrollAssetA = (accountBalanceWithStakedA - balanceA) | |
565 | 555 | let uncountableAmountEnrollAssetB = (accountBalanceWithStakedB - balanceB) | |
566 | 556 | let amountEnrollA = (uncountableAmountEnrollAssetA - (if ((assetIdA == unit)) | |
567 | 557 | then amountLeave | |
568 | 558 | else 0)) | |
569 | 559 | let amountEnrollB = (uncountableAmountEnrollAssetB - (if ((assetIdB == unit)) | |
570 | 560 | then amountLeave | |
571 | 561 | else 0)) | |
572 | 562 | if ((i.caller != this)) | |
573 | 563 | then throw("Only the DApp itself can call this function") | |
574 | 564 | else if ((0 > amountLeave)) | |
575 | 565 | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave))) | |
576 | 566 | else if (if ((0 > uncountableAmountEnrollAssetA)) | |
577 | 567 | then true | |
578 | 568 | else (0 > uncountableAmountEnrollAssetB)) | |
579 | 569 | then suspend("Enroll amount negative") | |
580 | 570 | else if (if ((0 > amountEnrollA)) | |
581 | 571 | then true | |
582 | 572 | else (0 > amountEnrollB)) | |
583 | 573 | then throw("Too large amountLeave") | |
584 | 574 | else { | |
585 | 575 | let stake1 = if (if (containsElement(stakingAssets, strAssetIdA)) | |
586 | 576 | then (amountEnrollA > 0) | |
587 | 577 | else false) | |
588 | 578 | then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil) | |
589 | 579 | else 0 | |
590 | 580 | if ((stake1 == stake1)) | |
591 | 581 | then { | |
592 | 582 | let stake2 = if (if (containsElement(stakingAssets, strAssetIdB)) | |
593 | 583 | then (amountEnrollB > 0) | |
594 | 584 | else false) | |
595 | 585 | then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil) | |
596 | 586 | else 0 | |
597 | 587 | if ((stake2 == stake2)) | |
598 | 588 | then [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
599 | 589 | else throw("Strict value is not equal to itself.") | |
600 | 590 | } | |
601 | 591 | else throw("Strict value is not equal to itself.") | |
602 | 592 | } | |
603 | 593 | }) | |
604 | 594 | ||
605 | 595 | ||
606 | 596 | ||
607 | 597 | @Callable(i) | |
608 | 598 | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
609 | 599 | then throw("Only contract itself can invoke this function") | |
610 | 600 | else if ((assetIdString == "WAVES")) | |
611 | 601 | then { | |
612 | 602 | let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, keyLeasingPool), "No leasing pool in oracle")) | |
613 | 603 | let leasingId = getBinary(this, keyLeasingId) | |
614 | 604 | let leasingAmount = valueOrElse(getInteger(this, keyLeasingAmount), 0) | |
615 | 605 | let newLeaseAmount = if (stake) | |
616 | 606 | then (leasingAmount + amount) | |
617 | 607 | else (leasingAmount - amount) | |
618 | 608 | let newLease = Lease(pool, newLeaseAmount) | |
619 | 609 | let newLeaseId = calculateLeaseId(newLease) | |
620 | 610 | let baseEtry = [newLease, BinaryEntry(keyLeasingId, newLeaseId), IntegerEntry(keyLeasingAmount, newLeaseAmount)] | |
621 | 611 | match leasingId { | |
622 | 612 | case lId: ByteVector => | |
623 | 613 | ([LeaseCancel(lId)] ++ baseEtry) | |
624 | 614 | case _ => | |
625 | 615 | baseEtry | |
626 | 616 | } | |
627 | 617 | } | |
628 | 618 | else { | |
629 | 619 | let $t02415124254 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
630 | 620 | let call = $t02415124254._1 | |
631 | 621 | let addr = $t02415124254._2 | |
632 | 622 | let params = $t02415124254._3 | |
633 | 623 | let payments = $t02415124254._4 | |
634 | 624 | let inv = invoke(addr, call, params, payments) | |
635 | 625 | if ((inv == inv)) | |
636 | 626 | then nil | |
637 | 627 | else throw("Strict value is not equal to itself.") | |
638 | 628 | } | |
639 | 629 | ||
640 | 630 | ||
641 | 631 | ||
642 | 632 | @Callable(i) | |
643 | 633 | func stakeAll () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
644 | 634 | then throw("Only admin can call this function") | |
645 | 635 | else { | |
646 | 636 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
647 | 637 | then { | |
648 | 638 | let amountA = (balanceA - stakedAmountA) | |
649 | 639 | if ((amountA > 0)) | |
650 | 640 | then invoke(this, "stakeUnstake", [true, amountA, strAssetIdA], nil) | |
651 | 641 | else 0 | |
652 | 642 | } | |
653 | 643 | else 0 | |
654 | 644 | if ((stake1 == stake1)) | |
655 | 645 | then { | |
656 | 646 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
657 | 647 | then { | |
658 | 648 | let amountB = (balanceB - stakedAmountB) | |
659 | 649 | if ((amountB > 0)) | |
660 | 650 | then invoke(this, "stakeUnstake", [true, amountB, strAssetIdB], nil) | |
661 | 651 | else 0 | |
662 | 652 | } | |
663 | 653 | else 0 | |
664 | 654 | if ((stake2 == stake2)) | |
665 | 655 | then nil | |
666 | 656 | else throw("Strict value is not equal to itself.") | |
667 | 657 | } | |
668 | 658 | else throw("Strict value is not equal to itself.") | |
669 | 659 | }) | |
670 | 660 | ||
671 | 661 | ||
672 | 662 | @Verifier(tx) | |
673 | 663 | func verify () = { | |
674 | 664 | let multiSignedByAdmins = { | |
675 | 665 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
676 | 666 | then 1 | |
677 | 667 | else 0 | |
678 | 668 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
679 | 669 | then 1 | |
680 | 670 | else 0 | |
681 | 671 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
682 | 672 | then 1 | |
683 | 673 | else 0 | |
684 | 674 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
685 | 675 | } | |
686 | 676 | match tx { | |
687 | 677 | case inv: InvokeScriptTransaction => | |
688 | 678 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
689 | 679 | then (inv.function == "takeIntoAccountExtraFunds") | |
690 | 680 | else false | |
691 | 681 | let exchangeToWaves = if (if (if ((inv.dApp == USDNToWavesExchanger)) | |
692 | 682 | then (inv.function == "exchange") | |
693 | 683 | else false) | |
694 | 684 | then (assetIdA == USDN) | |
695 | 685 | else false) | |
696 | 686 | then true | |
697 | 687 | else if (if ((assetIdB == USDN)) | |
698 | 688 | then (size(inv.payments) == 1) | |
699 | 689 | else false) | |
700 | 690 | then (inv.payments[0].assetId == USDN) | |
701 | 691 | else false | |
702 | 692 | let exchangeToNSBTs = if (if (if ((inv.dApp == USDNToNSBTExchanger)) | |
703 | 693 | then (inv.function == "exchange") | |
704 | 694 | else false) | |
705 | 695 | then (assetIdA == NSBT) | |
706 | 696 | else false) | |
707 | 697 | then true | |
708 | 698 | else if (if ((assetIdB == NSBT)) | |
709 | 699 | then (size(inv.payments) == 1) | |
710 | 700 | else false) | |
711 | 701 | then (inv.payments[0].assetId == USDN) | |
712 | 702 | else false | |
713 | 703 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
714 | 704 | then true | |
715 | 705 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
716 | 706 | then true | |
717 | 707 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
718 | 708 | then true | |
719 | 709 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
720 | 710 | if (if (if (if (callTakeIntoAccount) | |
721 | 711 | then true | |
722 | 712 | else exchangeToWaves) | |
723 | 713 | then true | |
724 | 714 | else exchangeToNSBTs) | |
725 | 715 | then signedByAdmin | |
726 | 716 | else false) | |
727 | 717 | then true | |
728 | 718 | else multiSignedByAdmins | |
729 | 719 | case _ => | |
730 | 720 | multiSignedByAdmins | |
731 | 721 | } | |
732 | 722 | } | |
733 | 723 |
github/deemru/w8io/169f3d6 124.19 ms ◑