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