tx · AfJ77yExzGS5YfaSYXPQBHC7YKMqE1Jcz2SYdjr8zDN 3N67pVXcg9s9Lc1iP6ToMo6rjbchjKitmd8: -0.01400000 Waves 2021.05.19 20:16 [1532836] smart account 3N67pVXcg9s9Lc1iP6ToMo6rjbchjKitmd8 > SELF 0.00000000 Waves
{ "type": 13, "id": "AfJ77yExzGS5YfaSYXPQBHC7YKMqE1Jcz2SYdjr8zDN", "fee": 1400000, "feeAssetId": null, "timestamp": 1621444690199, "version": 2, "chainId": 84, "sender": "3N67pVXcg9s9Lc1iP6ToMo6rjbchjKitmd8", "senderPublicKey": "9jgiS4xuTrBNA9PtddTXFuJwnz3c873Rme31h4g2eLtq", "proofs": [ "54bM1EXCHz46oej7YpijHr5p4MKsH4LZZwn4pZgSfruPM7FxP9XCANDbVnBJyxygFVYETCvL7RPdDkFvS7yhCJ9b" ], "script": "base64:AAIEAAAAAAAAACoIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgMKAQEAAABFAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAC2tleUFzc2V0SWRBAgAAAApBX2Fzc2V0X2lkAAAAAAtrZXlBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAALa2V5QmFsYW5jZUECAAAAD0FfYXNzZXRfYmFsYW5jZQAAAAALa2V5QmFsYW5jZUICAAAAD0JfYXNzZXRfYmFsYW5jZQAAAAAPa2V5QmFsYW5jZUluaXRBAgAAAAxBX2Fzc2V0X2luaXQAAAAAD2tleUJhbGFuY2VJbml0QgIAAAAMQl9hc3NldF9pbml0AAAAAA9rZXlTaGFyZUFzc2V0SWQCAAAADnNoYXJlX2Fzc2V0X2lkAAAAABNrZXlTaGFyZUFzc2V0U3VwcGx5AgAAABJzaGFyZV9hc3NldF9zdXBwbHkAAAAADWtleUNvbW1pc3Npb24CAAAAC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AAAEVVNETgcGAwkAAAAAAAACCAUAAAAGaW52b2tlAAAACGZ1bmN0aW9uAgAAAA51bmxvY2tOZXV0cmlubwkAAAAAAAACCQABkAAAAAEIBQAAAAZpbnZva2UAAAAIcGF5bWVudHMAAAAAAAAAAAAHBwQAAAANc2lnbmVkQnlBZG1pbgMDAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MQYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTIGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkzBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAEmFkbWluUHViS2V5U3Rha2luZwMFAAAAE2NhbGxUYWtlSW50b0FjY291bnQGBQAAAAtjYWxsU3Rha2luZwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXn2YhxC", "height": 1532836, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7ic8PFwhq1SbaJT4mshZfUXy5RLavkCzRK6dakfxpSa4 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
266 | 266 | let shareInitialSupply = 0 | |
267 | 267 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
268 | 268 | let shareIssueId = calculateAssetId(shareIssue) | |
269 | - | 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(keyFirstHarvestHeight, (firstHarvestEndPeriod * periodLength)), IntegerEntry(keyShareAssetSupply, shareInitialSupply)] | |
269 | + | 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(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength))), IntegerEntry(keyShareAssetSupply, shareInitialSupply)] | |
270 | 270 | if (firstHarvest) | |
271 | - | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (firstHarvestEndPeriod * periodLength))]) | |
271 | + | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
272 | 272 | else baseEntry | |
273 | 273 | } | |
274 | 274 | } | |
294 | 294 | then (balanceB == 0) | |
295 | 295 | else false) | |
296 | 296 | then { | |
297 | - | let $ | |
298 | - | let pmtStrAssetIdA = $ | |
299 | - | let pmtAssetNameA = $ | |
300 | - | let pmtDecimalsA = $ | |
301 | - | let $ | |
302 | - | let pmtStrAssetIdB = $ | |
303 | - | let pmtAssetNameB = $ | |
304 | - | let pmtDecimalsB = $ | |
297 | + | let $t01166611743 = getAssetInfo(pmtAssetIdA) | |
298 | + | let pmtStrAssetIdA = $t01166611743._1 | |
299 | + | let pmtAssetNameA = $t01166611743._2 | |
300 | + | let pmtDecimalsA = $t01166611743._3 | |
301 | + | let $t01175211829 = getAssetInfo(pmtAssetIdB) | |
302 | + | let pmtStrAssetIdB = $t01175211829._1 | |
303 | + | let pmtAssetNameB = $t01175211829._2 | |
304 | + | let pmtDecimalsB = $t01175211829._3 | |
305 | 305 | let tokenRatio = fraction(fraction(assetInitA, scaleValue8, pmtAmountA), scaleValue3, fraction(assetInitB, scaleValue8, pmtAmountB)) | |
306 | 306 | if ((pmtAssetIdA == pmtAssetIdB)) | |
307 | 307 | then throw("Assets must be different") | |
364 | 364 | ||
365 | 365 | @Callable(i) | |
366 | 366 | func withdraw () = { | |
367 | - | let $ | |
368 | - | let pmtAmount = $ | |
369 | - | let pmtAssetId = $ | |
367 | + | let $t01646316613 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
368 | + | let pmtAmount = $t01646316613._1 | |
369 | + | let pmtAssetId = $t01646316613._2 | |
370 | 370 | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA) | |
371 | 371 | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB) | |
372 | 372 | if (!(isActive)) | |
388 | 388 | ||
389 | 389 | @Callable(i) | |
390 | 390 | func exchange (minAmountToReceive) = { | |
391 | - | let $ | |
392 | - | let pmtAmount = $ | |
393 | - | let pmtAssetId = $ | |
391 | + | let $t01800318078 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
392 | + | let pmtAmount = $t01800318078._1 | |
393 | + | let pmtAssetId = $t01800318078._2 | |
394 | 394 | func calculateFees (tokenFrom,tokenTo) = { | |
395 | 395 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
396 | 396 | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
415 | 415 | else if ((pmtAssetId == assetIdA)) | |
416 | 416 | then { | |
417 | 417 | let assetIdSend = assetIdB | |
418 | - | let $ | |
419 | - | let amountWithoutFee = $ | |
420 | - | let amountWithFee = $ | |
421 | - | let governanceReward = $ | |
418 | + | let $t01953719628 = calculateFees(balanceA, balanceB) | |
419 | + | let amountWithoutFee = $t01953719628._1 | |
420 | + | let amountWithFee = $t01953719628._2 | |
421 | + | let governanceReward = $t01953719628._3 | |
422 | 422 | let newBalanceA = (balanceA + pmtAmount) | |
423 | 423 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
424 | 424 | if (if (if ((assetIdA == USDN)) | |
434 | 434 | else if ((pmtAssetId == assetIdB)) | |
435 | 435 | then { | |
436 | 436 | let assetIdSend = assetIdA | |
437 | - | let $ | |
438 | - | let amountWithoutFee = $ | |
439 | - | let amountWithFee = $ | |
440 | - | let governanceReward = $ | |
437 | + | let $t02049720588 = calculateFees(balanceB, balanceA) | |
438 | + | let amountWithoutFee = $t02049720588._1 | |
439 | + | let amountWithFee = $t02049720588._2 | |
440 | + | let governanceReward = $t02049720588._3 | |
441 | 441 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
442 | 442 | let newBalanceB = (balanceB + pmtAmount) | |
443 | 443 | if (if (if ((assetIdA == USDN)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
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 | 43 | ||
44 | 44 | let kFirstHarvestHeight = "first_harvest_height" | |
45 | 45 | ||
46 | 46 | let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
47 | 47 | ||
48 | 48 | let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
49 | 49 | ||
50 | 50 | let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
51 | 51 | ||
52 | 52 | let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
53 | 53 | ||
54 | 54 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
55 | 55 | ||
56 | 56 | let adminPubKeyBackend = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
57 | 57 | ||
58 | 58 | let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
59 | 59 | ||
60 | 60 | let votingAddress = Address(base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN') | |
61 | 61 | ||
62 | 62 | let stakingAddress = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
63 | 63 | ||
64 | 64 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
65 | 65 | ||
66 | 66 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
67 | 67 | ||
68 | 68 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
69 | 69 | ||
70 | 70 | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 2) | |
71 | 71 | ||
72 | 72 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
73 | 73 | ||
74 | 74 | let stakingFeeInUSDN = (9 * value(value(assetInfo(USDN)).minSponsoredFee)) | |
75 | 75 | ||
76 | 76 | let isActive = getBooleanValue(this, keyActive) | |
77 | 77 | ||
78 | 78 | let strAssetIdA = getStringValue(this, keyAssetIdA) | |
79 | 79 | ||
80 | 80 | let strAssetIdB = getStringValue(this, keyAssetIdB) | |
81 | 81 | ||
82 | 82 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
83 | 83 | then unit | |
84 | 84 | else fromBase58String(strAssetIdA) | |
85 | 85 | ||
86 | 86 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
87 | 87 | then unit | |
88 | 88 | else fromBase58String(strAssetIdB) | |
89 | 89 | ||
90 | 90 | let assetNameA = match assetIdA { | |
91 | 91 | case id: ByteVector => | |
92 | 92 | value(assetInfo(id)).name | |
93 | 93 | case waves: Unit => | |
94 | 94 | "WAVES" | |
95 | 95 | case _ => | |
96 | 96 | throw("Match error") | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | let assetNameB = match assetIdB { | |
100 | 100 | case id: ByteVector => | |
101 | 101 | value(assetInfo(id)).name | |
102 | 102 | case waves: Unit => | |
103 | 103 | "WAVES" | |
104 | 104 | case _ => | |
105 | 105 | throw("Match error") | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | let balanceA = getIntegerValue(this, keyBalanceA) | |
109 | 109 | ||
110 | 110 | let balanceB = getIntegerValue(this, keyBalanceB) | |
111 | 111 | ||
112 | 112 | let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId)) | |
113 | 113 | ||
114 | 114 | let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply) | |
115 | 115 | ||
116 | 116 | let commission = 3000 | |
117 | 117 | ||
118 | 118 | let commissionGovernance = 1200 | |
119 | 119 | ||
120 | 120 | let commissionScaleDelimiter = 1000000 | |
121 | 121 | ||
122 | 122 | let scaleValue3 = 1000 | |
123 | 123 | ||
124 | 124 | let scaleValue8 = 100000000 | |
125 | 125 | ||
126 | 126 | let slippageToleranceDelimiter = 1000 | |
127 | 127 | ||
128 | 128 | let scaleValue8Digits = 8 | |
129 | 129 | ||
130 | 130 | func accountBalance (assetId) = match assetId { | |
131 | 131 | case id: ByteVector => | |
132 | 132 | assetBalance(this, id) | |
133 | 133 | case waves: Unit => | |
134 | 134 | wavesBalance(this).available | |
135 | 135 | case _ => | |
136 | 136 | throw("Match error") | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | let stakedAmountUSDN = match getInteger(stakingAddress, ((("rpd_balance_" + toBase58String(USDN)) + "_") + toString(this))) { | |
141 | 141 | case staked: Int => | |
142 | 142 | staked | |
143 | 143 | case nothing: Unit => | |
144 | 144 | 0 | |
145 | 145 | case _ => | |
146 | 146 | throw("Match error") | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | let assetInitA = getIntegerValue(this, keyBalanceInitA) | |
150 | 150 | ||
151 | 151 | let assetInitB = getIntegerValue(this, keyBalanceInitB) | |
152 | 152 | ||
153 | 153 | let availableBalanceA = (balanceA - (if ((assetIdA == USDN)) | |
154 | 154 | then stakedAmountUSDN | |
155 | 155 | else 0)) | |
156 | 156 | ||
157 | 157 | let availableBalanceB = (balanceB - (if ((assetIdB == USDN)) | |
158 | 158 | then stakedAmountUSDN | |
159 | 159 | else 0)) | |
160 | 160 | ||
161 | 161 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + (if ((assetIdA == USDN)) | |
162 | 162 | then stakedAmountUSDN | |
163 | 163 | else 0)) | |
164 | 164 | ||
165 | 165 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + (if ((assetIdB == USDN)) | |
166 | 166 | then stakedAmountUSDN | |
167 | 167 | else 0)) | |
168 | 168 | ||
169 | 169 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
170 | 170 | then (accountBalanceWithStakedB >= balanceB) | |
171 | 171 | else false | |
172 | 172 | ||
173 | 173 | func getAssetInfo (assetId) = match assetId { | |
174 | 174 | case id: ByteVector => | |
175 | 175 | let stringId = toBase58String(id) | |
176 | 176 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
177 | 177 | $Tuple3(stringId, info.name, info.decimals) | |
178 | 178 | case waves: Unit => | |
179 | 179 | $Tuple3("WAVES", "WAVES", 8) | |
180 | 180 | case _ => | |
181 | 181 | throw("Match error") | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES")) | |
186 | 186 | then $Tuple3("WAVES", "WAVES", 8) | |
187 | 187 | else { | |
188 | 188 | let stringId = assetStr | |
189 | 189 | let id = fromBase58String(assetStr) | |
190 | 190 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
191 | 191 | $Tuple3(stringId, info.name, info.decimals) | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func deductStakingFee (amount,assetId) = if ((assetId == USDN)) | |
199 | 199 | then { | |
200 | 200 | let result = (amount - stakingFeeInUSDN) | |
201 | 201 | if ((0 >= result)) | |
202 | 202 | then throw((((("Insufficient amount " + toString(amount)) + " to deduct staking fee ") + toString(stakingFeeInUSDN)) + " USD-N")) | |
203 | 203 | else result | |
204 | 204 | } | |
205 | 205 | else amount | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func throwInsufficientAvailableBalance (amount,available,assetName) = throw((((((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking. Available: ") + toString(available)) + " ") + assetName) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func throwInsufficientAvailableBalances (amountA,amountB) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(amountA)) + " ") + assetNameA) + " and ") + toString(amountB)) + " ") + assetNameB) + " due to staking. Available: ") + toString(availableBalanceA)) + " ") + assetNameA) + " and ") + toString(availableBalanceB)) + " ") + assetNameB) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | @Callable(i) | |
215 | 215 | func init (firstHarvest) = { | |
216 | 216 | let $t061296206 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
217 | 217 | let pmtAmountA = $t061296206._1 | |
218 | 218 | let pmtAssetIdA = $t061296206._2 | |
219 | 219 | let $t062116288 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
220 | 220 | let pmtAmountB = $t062116288._1 | |
221 | 221 | let pmtAssetIdB = $t062116288._2 | |
222 | 222 | let $t062936370 = getAssetInfo(pmtAssetIdA) | |
223 | 223 | let pmtStrAssetIdA = $t062936370._1 | |
224 | 224 | let pmtAssetNameA = $t062936370._2 | |
225 | 225 | let pmtDecimalsA = $t062936370._3 | |
226 | 226 | let $t063756635 = getAssetInfo(pmtAssetIdB) | |
227 | 227 | let pmtStrAssetIdB = $t063756635._1 | |
228 | 228 | let pmtAssetNameB = $t063756635._2 | |
229 | 229 | let pmtDecimalsB = $t063756635._3 | |
230 | 230 | if (isDefined(getBoolean(this, keyActive))) | |
231 | 231 | then throw("DApp is already active") | |
232 | 232 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
233 | 233 | then throw("Assets must be different") | |
234 | 234 | else { | |
235 | 235 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
236 | 236 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
237 | 237 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
238 | 238 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN)) | |
239 | 239 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
240 | 240 | let shareIssueId = calculateAssetId(shareIssue) | |
241 | 241 | 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)] | |
242 | 242 | if (firstHarvest) | |
243 | 243 | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
244 | 244 | else baseEntry | |
245 | 245 | } | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | ||
250 | 250 | @Callable(i) | |
251 | 251 | func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = { | |
252 | 252 | let $t086758762 = getAssetInfoFromString(strAssetIdA) | |
253 | 253 | let pmtStrAssetIdA = $t086758762._1 | |
254 | 254 | let pmtAssetNameA = $t086758762._2 | |
255 | 255 | let pmtDecimalsA = $t086758762._3 | |
256 | 256 | let $t087679141 = getAssetInfoFromString(strAssetIdB) | |
257 | 257 | let pmtStrAssetIdB = $t087679141._1 | |
258 | 258 | let pmtAssetNameB = $t087679141._2 | |
259 | 259 | let pmtDecimalsB = $t087679141._3 | |
260 | 260 | if ((strAssetIdA == strAssetIdB)) | |
261 | 261 | then throw("Assets must be different") | |
262 | 262 | else { | |
263 | 263 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
264 | 264 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
265 | 265 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
266 | 266 | let shareInitialSupply = 0 | |
267 | 267 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
268 | 268 | let shareIssueId = calculateAssetId(shareIssue) | |
269 | - | 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(keyFirstHarvestHeight, (firstHarvestEndPeriod * periodLength)), IntegerEntry(keyShareAssetSupply, shareInitialSupply)] | |
269 | + | 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(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength))), IntegerEntry(keyShareAssetSupply, shareInitialSupply)] | |
270 | 270 | if (firstHarvest) | |
271 | - | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (firstHarvestEndPeriod * periodLength))]) | |
271 | + | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
272 | 272 | else baseEntry | |
273 | 273 | } | |
274 | 274 | } | |
275 | 275 | ||
276 | 276 | ||
277 | 277 | ||
278 | 278 | @Callable(i) | |
279 | 279 | func keepLimitForFirstHarvest (shareLimit) = if (!(isActive)) | |
280 | 280 | then throw("DApp is inactive at this moment") | |
281 | 281 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
282 | 282 | then throw("Only admin can call this function") | |
283 | 283 | else [IntegerEntry(kShareLimit, shareLimit)] | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | ||
287 | 287 | @Callable(i) | |
288 | 288 | func replenishWithTwoTokens (slippageTolerance) = { | |
289 | 289 | let pmtAssetIdA = i.payments[0].assetId | |
290 | 290 | let pmtAssetIdB = i.payments[1].assetId | |
291 | 291 | let pmtAmountA = deductStakingFee(i.payments[0].amount, pmtAssetIdA) | |
292 | 292 | let pmtAmountB = deductStakingFee(i.payments[1].amount, pmtAssetIdB) | |
293 | 293 | if (if ((balanceA == 0)) | |
294 | 294 | then (balanceB == 0) | |
295 | 295 | else false) | |
296 | 296 | then { | |
297 | - | let $ | |
298 | - | let pmtStrAssetIdA = $ | |
299 | - | let pmtAssetNameA = $ | |
300 | - | let pmtDecimalsA = $ | |
301 | - | let $ | |
302 | - | let pmtStrAssetIdB = $ | |
303 | - | let pmtAssetNameB = $ | |
304 | - | let pmtDecimalsB = $ | |
297 | + | let $t01166611743 = getAssetInfo(pmtAssetIdA) | |
298 | + | let pmtStrAssetIdA = $t01166611743._1 | |
299 | + | let pmtAssetNameA = $t01166611743._2 | |
300 | + | let pmtDecimalsA = $t01166611743._3 | |
301 | + | let $t01175211829 = getAssetInfo(pmtAssetIdB) | |
302 | + | let pmtStrAssetIdB = $t01175211829._1 | |
303 | + | let pmtAssetNameB = $t01175211829._2 | |
304 | + | let pmtDecimalsB = $t01175211829._3 | |
305 | 305 | let tokenRatio = fraction(fraction(assetInitA, scaleValue8, pmtAmountA), scaleValue3, fraction(assetInitB, scaleValue8, pmtAmountB)) | |
306 | 306 | if ((pmtAssetIdA == pmtAssetIdB)) | |
307 | 307 | then throw("Assets must be different") | |
308 | 308 | else { | |
309 | 309 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
310 | 310 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN)) | |
311 | 311 | if (!(isActive)) | |
312 | 312 | then throw("DApp is inactive at this moment") | |
313 | 313 | else if (if ((0 > slippageTolerance)) | |
314 | 314 | then true | |
315 | 315 | else (slippageTolerance > slippageToleranceDelimiter)) | |
316 | 316 | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
317 | 317 | else if ((size(i.payments) != 2)) | |
318 | 318 | then throw("Two attached assets expected") | |
319 | 319 | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
320 | 320 | then true | |
321 | 321 | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
322 | 322 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
323 | 323 | else if (if ((pmtAssetIdA != assetIdA)) | |
324 | 324 | then true | |
325 | 325 | else (pmtAssetIdB != assetIdB)) | |
326 | 326 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
327 | 327 | else if ((shareInitialSupply == 0)) | |
328 | 328 | then throw("Too small amount to replenish") | |
329 | 329 | else if (!(hasEnoughBalance)) | |
330 | 330 | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
331 | 331 | else [Reissue(shareAssetId, shareInitialSupply, true), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareAssetId)] | |
332 | 332 | } | |
333 | 333 | } | |
334 | 334 | else { | |
335 | 335 | let tokenRatio = fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB)) | |
336 | 336 | let ratioShareTokensInA = fraction(pmtAmountA, scaleValue8, balanceA) | |
337 | 337 | let ratioShareTokensInB = fraction(pmtAmountB, scaleValue8, balanceB) | |
338 | 338 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scaleValue8) | |
339 | 339 | if (!(isActive)) | |
340 | 340 | then throw("DApp is inactive at this moment") | |
341 | 341 | else if (if ((0 > slippageTolerance)) | |
342 | 342 | then true | |
343 | 343 | else (slippageTolerance > slippageToleranceDelimiter)) | |
344 | 344 | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
345 | 345 | else if ((size(i.payments) != 2)) | |
346 | 346 | then throw("Two attached assets expected") | |
347 | 347 | else if (if ((pmtAssetIdA != assetIdA)) | |
348 | 348 | then true | |
349 | 349 | else (pmtAssetIdB != assetIdB)) | |
350 | 350 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
351 | 351 | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
352 | 352 | then true | |
353 | 353 | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
354 | 354 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
355 | 355 | else if ((shareTokenToPayAmount == 0)) | |
356 | 356 | then throw("Too small amount to replenish") | |
357 | 357 | else if (!(hasEnoughBalance)) | |
358 | 358 | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
359 | 359 | else [IntegerEntry(keyBalanceA, (balanceA + pmtAmountA)), IntegerEntry(keyBalanceB, (balanceB + pmtAmountB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
360 | 360 | } | |
361 | 361 | } | |
362 | 362 | ||
363 | 363 | ||
364 | 364 | ||
365 | 365 | @Callable(i) | |
366 | 366 | func withdraw () = { | |
367 | - | let $ | |
368 | - | let pmtAmount = $ | |
369 | - | let pmtAssetId = $ | |
367 | + | let $t01646316613 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
368 | + | let pmtAmount = $t01646316613._1 | |
369 | + | let pmtAssetId = $t01646316613._2 | |
370 | 370 | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA) | |
371 | 371 | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB) | |
372 | 372 | if (!(isActive)) | |
373 | 373 | then throw("DApp is inactive at this moment") | |
374 | 374 | else if ((size(i.payments) != 1)) | |
375 | 375 | then throw("One attached payment expected") | |
376 | 376 | else if ((pmtAssetId != shareAssetId)) | |
377 | 377 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
378 | 378 | else if (!(hasEnoughBalance)) | |
379 | 379 | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
380 | 380 | else if (if ((amountToPayA > availableBalanceA)) | |
381 | 381 | then true | |
382 | 382 | else (amountToPayB > availableBalanceB)) | |
383 | 383 | then throwInsufficientAvailableBalances(amountToPayA, amountToPayB) | |
384 | 384 | else [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)] | |
385 | 385 | } | |
386 | 386 | ||
387 | 387 | ||
388 | 388 | ||
389 | 389 | @Callable(i) | |
390 | 390 | func exchange (minAmountToReceive) = { | |
391 | - | let $ | |
392 | - | let pmtAmount = $ | |
393 | - | let pmtAssetId = $ | |
391 | + | let $t01800318078 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
392 | + | let pmtAmount = $t01800318078._1 | |
393 | + | let pmtAssetId = $t01800318078._2 | |
394 | 394 | func calculateFees (tokenFrom,tokenTo) = { | |
395 | 395 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
396 | 396 | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
397 | 397 | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
398 | 398 | if ((minAmountToReceive > amountWithFee)) | |
399 | 399 | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
400 | 400 | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
401 | 401 | } | |
402 | 402 | ||
403 | 403 | if (!(isActive)) | |
404 | 404 | then throw("DApp is inactive at this moment") | |
405 | 405 | else if (if ((balanceA == 0)) | |
406 | 406 | then true | |
407 | 407 | else (balanceB == 0)) | |
408 | 408 | then throw("Can't exchange with zero balance") | |
409 | 409 | else if ((0 >= minAmountToReceive)) | |
410 | 410 | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
411 | 411 | else if ((size(i.payments) != 1)) | |
412 | 412 | then throw("One attached payment expected") | |
413 | 413 | else if (!(hasEnoughBalance)) | |
414 | 414 | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
415 | 415 | else if ((pmtAssetId == assetIdA)) | |
416 | 416 | then { | |
417 | 417 | let assetIdSend = assetIdB | |
418 | - | let $ | |
419 | - | let amountWithoutFee = $ | |
420 | - | let amountWithFee = $ | |
421 | - | let governanceReward = $ | |
418 | + | let $t01953719628 = calculateFees(balanceA, balanceB) | |
419 | + | let amountWithoutFee = $t01953719628._1 | |
420 | + | let amountWithFee = $t01953719628._2 | |
421 | + | let governanceReward = $t01953719628._3 | |
422 | 422 | let newBalanceA = (balanceA + pmtAmount) | |
423 | 423 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
424 | 424 | if (if (if ((assetIdA == USDN)) | |
425 | 425 | then (stakedAmountUSDN >= newBalanceA) | |
426 | 426 | else false) | |
427 | 427 | then true | |
428 | 428 | else if ((assetIdB == USDN)) | |
429 | 429 | then (stakedAmountUSDN >= newBalanceB) | |
430 | 430 | else false) | |
431 | 431 | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceB, assetNameB) | |
432 | 432 | else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)] | |
433 | 433 | } | |
434 | 434 | else if ((pmtAssetId == assetIdB)) | |
435 | 435 | then { | |
436 | 436 | let assetIdSend = assetIdA | |
437 | - | let $ | |
438 | - | let amountWithoutFee = $ | |
439 | - | let amountWithFee = $ | |
440 | - | let governanceReward = $ | |
437 | + | let $t02049720588 = calculateFees(balanceB, balanceA) | |
438 | + | let amountWithoutFee = $t02049720588._1 | |
439 | + | let amountWithFee = $t02049720588._2 | |
440 | + | let governanceReward = $t02049720588._3 | |
441 | 441 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
442 | 442 | let newBalanceB = (balanceB + pmtAmount) | |
443 | 443 | if (if (if ((assetIdA == USDN)) | |
444 | 444 | then (stakedAmountUSDN >= newBalanceA) | |
445 | 445 | else false) | |
446 | 446 | then true | |
447 | 447 | else if ((assetIdB == USDN)) | |
448 | 448 | then (stakedAmountUSDN >= newBalanceB) | |
449 | 449 | else false) | |
450 | 450 | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceA, assetNameA) | |
451 | 451 | else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)] | |
452 | 452 | } | |
453 | 453 | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
454 | 454 | } | |
455 | 455 | ||
456 | 456 | ||
457 | 457 | ||
458 | 458 | @Callable(i) | |
459 | 459 | func shutdown () = if (!(isActive)) | |
460 | 460 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
461 | 461 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
462 | 462 | then throw("Only admin can call this function") | |
463 | 463 | else suspend("Paused by admin") | |
464 | 464 | ||
465 | 465 | ||
466 | 466 | ||
467 | 467 | @Callable(i) | |
468 | 468 | func activate () = if (isActive) | |
469 | 469 | then throw("DApp is already active") | |
470 | 470 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
471 | 471 | then throw("Only admin can call this function") | |
472 | 472 | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)] | |
473 | 473 | ||
474 | 474 | ||
475 | 475 | ||
476 | 476 | @Callable(i) | |
477 | 477 | func takeIntoAccountExtraFunds (amountLeave) = { | |
478 | 478 | let uncountableAmountEnrollAssetA = (accountBalanceWithStakedA - balanceA) | |
479 | 479 | let uncountableAmountEnrollAssetB = (accountBalanceWithStakedB - balanceB) | |
480 | 480 | let amountEnrollA = (uncountableAmountEnrollAssetA - (if ((assetIdA == USDN)) | |
481 | 481 | then amountLeave | |
482 | 482 | else 0)) | |
483 | 483 | let amountEnrollB = (uncountableAmountEnrollAssetB - (if ((assetIdB == USDN)) | |
484 | 484 | then amountLeave | |
485 | 485 | else 0)) | |
486 | 486 | if (!(isActive)) | |
487 | 487 | then throw("DApp is inactive at this moment") | |
488 | 488 | else if ((i.caller != this)) | |
489 | 489 | then throw("Only the DApp itself can call this function") | |
490 | 490 | else if ((0 > amountLeave)) | |
491 | 491 | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave))) | |
492 | 492 | else if (if ((0 > uncountableAmountEnrollAssetA)) | |
493 | 493 | then true | |
494 | 494 | else (0 > uncountableAmountEnrollAssetB)) | |
495 | 495 | then suspend("Enroll amount negative") | |
496 | 496 | else if (if ((0 > amountEnrollA)) | |
497 | 497 | then true | |
498 | 498 | else (0 > amountEnrollB)) | |
499 | 499 | then throw("Too large amountLeave") | |
500 | 500 | else [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
501 | 501 | } | |
502 | 502 | ||
503 | 503 | ||
504 | 504 | @Verifier(tx) | |
505 | 505 | func verify () = match tx { | |
506 | 506 | case invoke: InvokeScriptTransaction => | |
507 | 507 | let callTakeIntoAccount = if ((invoke.dApp == this)) | |
508 | 508 | then (invoke.function == "takeIntoAccountExtraFunds") | |
509 | 509 | else false | |
510 | 510 | let callStaking = if ((invoke.dApp == stakingAddress)) | |
511 | 511 | then if (if (if ((invoke.function == "lockNeutrino")) | |
512 | 512 | then (size(invoke.payments) == 1) | |
513 | 513 | else false) | |
514 | 514 | then (invoke.payments[0].assetId == USDN) | |
515 | 515 | else false) | |
516 | 516 | then true | |
517 | 517 | else if ((invoke.function == "unlockNeutrino")) | |
518 | 518 | then (size(invoke.payments) == 0) | |
519 | 519 | else false | |
520 | 520 | else false | |
521 | 521 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
522 | 522 | then true | |
523 | 523 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
524 | 524 | then true | |
525 | 525 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
526 | 526 | then true | |
527 | 527 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
528 | 528 | if (callTakeIntoAccount) | |
529 | 529 | then true | |
530 | 530 | else callStaking | |
531 | 531 | case _ => | |
532 | 532 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
533 | 533 | } | |
534 | 534 |
github/deemru/w8io/026f985 77.80 ms ◑