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