tx · 8C8N2zosTqyJhAX2p5D8hGhRQSwV5kV9t9rxiXGzoj7u 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph: -0.01400000 Waves 2022.02.08 21:51 [1915035] smart account 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph > SELF 0.00000000 Waves
{ "type": 13, "id": "8C8N2zosTqyJhAX2p5D8hGhRQSwV5kV9t9rxiXGzoj7u", "fee": 1400000, "feeAssetId": null, "timestamp": 1644346328570, "version": 2, "chainId": 84, "sender": "3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph", "senderPublicKey": "G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD", "proofs": [ "35p5RzBkFbnUVymzJ95NByZP24B88xe92aHHCa9tJpFfHpNPaJuSqfs79nnnajt9j2xaq8RWhGtJVBDDAzCZ1TdX", "3uP8n9MEc1cRmVwg3YHcYbBkBZrvNbif6EwfFLMqKJCMeSFeHaRgUWteo6o5ojkRKL7ftdrwjoMAEZUvVKiYDYhm", "5URWwmvp6PRiTMuMAZ53aY2YmVBik174mERfFLLwFFb9cYYPDjpiJLSfmrJt7XkHq3wDYGJS6QpCWETgEo2EU7xJ" ], "script": "base64:AAIFAAAAAAAAAC4IAhIGCgQYGBgREgMKARgSBgoECAgBARIAEgMKAQgSAwoBCBIDCgEIEgQKAhgUAAAAFgAAAAAKZGVwb3NpdEZlZQAAAAAAAAAD6AAAAAANY29udHJvbGxlckZlZQAAAAAAAAAnEAAAAAALcGxhdGZvcm1GZWUAAAAAAAAAJxAAAAAADGFkbWluUHViS2V5MQEAAAAgTC9F1XzqFGGdLucFXlrRY8ZeleddBPtyCBFVfBI5UHgAAAAADGFkbWluUHViS2V5MgEAAAAgo1jhnK8LndnZN54kO2lFL7fWRlVIuOuttap+d1LEBD0AAAAADGFkbWluUHViS2V5MwEAAAAgitC0+TBLGvFUtXZrOXd2PwDRrAhjEzCY3dTlamSkHykAAAAADGFkbWluUHViS2V5NAEAA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nR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAMYWRtaW5QdWJLZXkyAAAAAAAAAAABAAAAAAAAAAAABAAAAAphZG0zU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAADGFkbWluUHViS2V5MwAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAAKYWRtMVNpZ25lZAUAAAAKYWRtMlNpZ25lZAUAAAAKYWRtM1NpZ25lZAAAAAAAAAAAAh8lVrk=", "height": 1915035, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9NWLe5RBugR8HYNXLgUd8oRtGUQxiYEv96JMjuM8ucYY Next: 8JeSP7piAh3WJ9FzDK2ntKsVifSEFpqcmUZhPHZKHjGX Diff:
Old | New | Differences | |
---|---|---|---|
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | - | @Callable(i) | |
106 | - | func test () = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
107 | - | then [StringEntry("test_admin", "passed")] | |
108 | - | else [StringEntry("test_admin", "not_passed")] | |
109 | - | ||
105 | + | func userWithdrawKey (pool,userAddress) = (((pool + "_") + userAddress) + "_withdraw") | |
110 | 106 | ||
111 | 107 | ||
112 | 108 | @Callable(i) | |
306 | 302 | ||
307 | 303 | ||
308 | 304 | @Callable(i) | |
305 | + | func initWithdraw (pool) = if ((size(i.payments) != 1)) | |
306 | + | then throw("One attached payment expected") | |
307 | + | else { | |
308 | + | let amount = i.payments[0].amount | |
309 | + | let assetId = i.payments[0].assetId | |
310 | + | let assetIdString = match assetId { | |
311 | + | case id: ByteVector => | |
312 | + | toBase58String(id) | |
313 | + | case _ => | |
314 | + | throw("Match error") | |
315 | + | } | |
316 | + | if ((0 >= amount)) | |
317 | + | then throw(("Withraw amount must be positive. Actual: " + toString(amount))) | |
318 | + | else if (isPoolActive(pool)) | |
319 | + | then { | |
320 | + | let userAddress = toString(i.caller) | |
321 | + | let transferToUserAmount = transferToUser(amount, fromBase58String(assetIdString), pool, withdrawType) | |
322 | + | let userRecordKey = userWithdrawKey(pool, userAddress) | |
323 | + | [IntegerEntry(userRecordKey, transferToUserAmount)] | |
324 | + | } | |
325 | + | else throw("Pool is not active!") | |
326 | + | } | |
327 | + | ||
328 | + | ||
329 | + | ||
330 | + | @Callable(i) | |
309 | 331 | func withdraw (pool) = if ((size(i.payments) != 1)) | |
310 | 332 | then throw("One attached payment expected") | |
311 | 333 | else { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let depositFee = 1000 | |
5 | 5 | ||
6 | 6 | let controllerFee = 10000 | |
7 | 7 | ||
8 | 8 | let platformFee = 10000 | |
9 | 9 | ||
10 | 10 | let adminPubKey1 = base58'68Po1k24uP6goKr7RDmXPg4QkMiKuyTMEirao14rif8s' | |
11 | 11 | ||
12 | 12 | let adminPubKey2 = base58'Bze4aurT9WmLgBT6swA9CajaZFtUwhtwCri6XGAjnAkt' | |
13 | 13 | ||
14 | 14 | let adminPubKey3 = base58'ALsqwPqiUP3bVbM7grozc1Y5oHVBAGKqACRJ5J8RXceC' | |
15 | 15 | ||
16 | 16 | let adminPubKey4 = base58'ALsqwPqiUP3bVbM7grozc1Y5oHVBAGKqACRJ5J8RXceC' | |
17 | 17 | ||
18 | 18 | let govermanceAddress = Address(base58'3N7ExjwfofPYTvNBv2zqtAtLcMxqjTxS7iL') | |
19 | 19 | ||
20 | 20 | let swopFiGovermanceAddress = Address(base58'3PLHVWCqA9DJPDbadUofTohnCULLauiDWhS') | |
21 | 21 | ||
22 | 22 | let farmingAddress = Address(base58'3NBTuZhn2CwAgWGL99qpGDjZQ4Wtbg56iDL') | |
23 | 23 | ||
24 | 24 | let keySWOPid = "SWOP_id" | |
25 | 25 | ||
26 | 26 | let SWOP = fromBase58String(getStringValue(farmingAddress, keySWOPid)) | |
27 | 27 | ||
28 | 28 | let depositType = "deposit" | |
29 | 29 | ||
30 | 30 | let withdrawType = "withdraw" | |
31 | 31 | ||
32 | 32 | let swopFiPools = ["3PPH7x7iqobW5ziyiRCic19rQqKr6nPYaK1", "3PKy2mZqnvT2EtpwDim9Mgs6YvCRe4s85nX", "3P27S9V36kw2McjWRZ37AxTx8iwkd7HXw6W"] | |
33 | 33 | ||
34 | 34 | let swopFiFunctions = ["replenishWithTwoTokens", "exchange"] | |
35 | 35 | ||
36 | 36 | func isPoolActive (pool) = { | |
37 | 37 | let kActive = (pool + "_active") | |
38 | 38 | let isActive = match getBoolean(this, kActive) { | |
39 | 39 | case boolean: Boolean => | |
40 | 40 | boolean | |
41 | 41 | case _ => | |
42 | 42 | throw("Pool is not active!") | |
43 | 43 | } | |
44 | 44 | isActive | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getDAppAssetAddress (pool) = match getString((pool + "_service_token")) { | |
49 | 49 | case string: String => | |
50 | 50 | string | |
51 | 51 | case nothing => | |
52 | 52 | throw("You try to deposit on unsupported pool") | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func getLiquidutyAssetAddress (pool) = match getString((pool + "_liquidity_token")) { | |
57 | 57 | case string: String => | |
58 | 58 | string | |
59 | 59 | case nothing => | |
60 | 60 | throw("You try to withdraw from unsupported pool") | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getStakedAmount (poolAddress) = if ((poolAddress == toBase58String(SWOP))) | |
65 | 65 | then match getInteger(swopFiGovermanceAddress, (toString(this) + "_SWOP_amount")) { | |
66 | 66 | case staked: Int => | |
67 | 67 | staked | |
68 | 68 | case nothing: Unit => | |
69 | 69 | 0 | |
70 | 70 | case _ => | |
71 | 71 | throw("Match error") | |
72 | 72 | } | |
73 | 73 | else match getInteger(farmingAddress, (((poolAddress + "_") + toString(this)) + "_share_tokens_locked")) { | |
74 | 74 | case staked: Int => | |
75 | 75 | staked | |
76 | 76 | case nothing: Unit => | |
77 | 77 | 0 | |
78 | 78 | case _ => | |
79 | 79 | throw("Match error") | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func transferToUser (amount,assetId,poolAddress,type) = { | |
84 | 84 | let dAppStakedTokens = getStakedAmount(poolAddress) | |
85 | 85 | let assetIdQuantity = match assetInfo(assetId) { | |
86 | 86 | case asset: Asset => | |
87 | 87 | asset.quantity | |
88 | 88 | case _ => | |
89 | 89 | throw("Can't find asset") | |
90 | 90 | } | |
91 | 91 | if ((dAppStakedTokens == 0)) | |
92 | 92 | then amount | |
93 | 93 | else if ((type == depositType)) | |
94 | 94 | then { | |
95 | 95 | let transferToUserAmount = fraction(amount, assetIdQuantity, dAppStakedTokens) | |
96 | 96 | transferToUserAmount | |
97 | 97 | } | |
98 | 98 | else { | |
99 | 99 | let transferToUserAmount = fraction(amount, dAppStakedTokens, assetIdQuantity) | |
100 | 100 | transferToUserAmount | |
101 | 101 | } | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | - | @Callable(i) | |
106 | - | func test () = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
107 | - | then [StringEntry("test_admin", "passed")] | |
108 | - | else [StringEntry("test_admin", "not_passed")] | |
109 | - | ||
105 | + | func userWithdrawKey (pool,userAddress) = (((pool + "_") + userAddress) + "_withdraw") | |
110 | 106 | ||
111 | 107 | ||
112 | 108 | @Callable(i) | |
113 | 109 | func addPools (pools,liquidityTokens,serviceTokens,liquidityTokenDecimals) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
114 | 110 | then { | |
115 | 111 | func generatePoolKeys (accumulated,pool) = IntegerEntry((pool + "_asset_balance"), 0) :: accumulated | |
116 | 112 | ||
117 | 113 | func generatePoolLiquidityTokenKeys (accumulated,pool) = { | |
118 | 114 | let poolIndex = value(indexOf(pools, pool)) | |
119 | 115 | let liquidityToken = liquidityTokens[poolIndex] | |
120 | 116 | StringEntry((pool + "_liquidity_token"), liquidityToken) :: accumulated | |
121 | 117 | } | |
122 | 118 | ||
123 | 119 | func generatePoolServiceTokenKeys (accumulated,pool) = { | |
124 | 120 | let poolIndex = value(indexOf(pools, pool)) | |
125 | 121 | let liquidityToken = serviceTokens[poolIndex] | |
126 | 122 | StringEntry((pool + "_service_token"), liquidityToken) :: accumulated | |
127 | 123 | } | |
128 | 124 | ||
129 | 125 | func generatePoolLiquidityTokenDecimalKeys (accumulated,pool) = { | |
130 | 126 | let poolIndex = value(indexOf(pools, pool)) | |
131 | 127 | let liquidityToken = liquidityTokenDecimals[poolIndex] | |
132 | 128 | IntegerEntry((pool + "_service_token_decimal"), liquidityToken) :: accumulated | |
133 | 129 | } | |
134 | 130 | ||
135 | 131 | func generatePoolActiveKeys (accumulated,pool) = BooleanEntry((pool + "_active"), true) :: accumulated | |
136 | 132 | ||
137 | 133 | let poolBalanceKeys = { | |
138 | 134 | let $l = pools | |
139 | 135 | let $s = size($l) | |
140 | 136 | let $acc0 = nil | |
141 | 137 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
142 | 138 | then $a | |
143 | 139 | else generatePoolKeys($a, $l[$i]) | |
144 | 140 | ||
145 | 141 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
146 | 142 | then $a | |
147 | 143 | else throw("List size exceeds 20") | |
148 | 144 | ||
149 | 145 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
150 | 146 | } | |
151 | 147 | let poolLiquidityTokenKeys = { | |
152 | 148 | let $l = pools | |
153 | 149 | let $s = size($l) | |
154 | 150 | let $acc0 = nil | |
155 | 151 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
156 | 152 | then $a | |
157 | 153 | else generatePoolLiquidityTokenKeys($a, $l[$i]) | |
158 | 154 | ||
159 | 155 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
160 | 156 | then $a | |
161 | 157 | else throw("List size exceeds 20") | |
162 | 158 | ||
163 | 159 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
164 | 160 | } | |
165 | 161 | let poolServiceTokenKeys = { | |
166 | 162 | let $l = pools | |
167 | 163 | let $s = size($l) | |
168 | 164 | let $acc0 = nil | |
169 | 165 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
170 | 166 | then $a | |
171 | 167 | else generatePoolServiceTokenKeys($a, $l[$i]) | |
172 | 168 | ||
173 | 169 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
174 | 170 | then $a | |
175 | 171 | else throw("List size exceeds 20") | |
176 | 172 | ||
177 | 173 | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
178 | 174 | } | |
179 | 175 | let poolLiquidityTokenDecimalKeys = { | |
180 | 176 | let $l = pools | |
181 | 177 | let $s = size($l) | |
182 | 178 | let $acc0 = nil | |
183 | 179 | func $f3_1 ($a,$i) = if (($i >= $s)) | |
184 | 180 | then $a | |
185 | 181 | else generatePoolLiquidityTokenDecimalKeys($a, $l[$i]) | |
186 | 182 | ||
187 | 183 | func $f3_2 ($a,$i) = if (($i >= $s)) | |
188 | 184 | then $a | |
189 | 185 | else throw("List size exceeds 20") | |
190 | 186 | ||
191 | 187 | $f3_2($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
192 | 188 | } | |
193 | 189 | let poolActiveKeys = { | |
194 | 190 | let $l = pools | |
195 | 191 | let $s = size($l) | |
196 | 192 | let $acc0 = nil | |
197 | 193 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
198 | 194 | then $a | |
199 | 195 | else generatePoolActiveKeys($a, $l[$i]) | |
200 | 196 | ||
201 | 197 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
202 | 198 | then $a | |
203 | 199 | else throw("List size exceeds 20") | |
204 | 200 | ||
205 | 201 | $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
206 | 202 | } | |
207 | 203 | ((((poolBalanceKeys ++ poolLiquidityTokenKeys) ++ poolServiceTokenKeys) ++ poolLiquidityTokenDecimalKeys) ++ poolActiveKeys) | |
208 | 204 | } | |
209 | 205 | else throw("Only admin can call this function") | |
210 | 206 | ||
211 | 207 | ||
212 | 208 | ||
213 | 209 | @Callable(i) | |
214 | 210 | func deleteDepositLockRecords (records) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
215 | 211 | then { | |
216 | 212 | func generateDeletingKeys (accumulated,record) = DeleteEntry((record + "_locked")) :: accumulated | |
217 | 213 | ||
218 | 214 | let deleteKeys = { | |
219 | 215 | let $l = records | |
220 | 216 | let $s = size($l) | |
221 | 217 | let $acc0 = nil | |
222 | 218 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
223 | 219 | then $a | |
224 | 220 | else generateDeletingKeys($a, $l[$i]) | |
225 | 221 | ||
226 | 222 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
227 | 223 | then $a | |
228 | 224 | else throw("List size exceeds 100") | |
229 | 225 | ||
230 | 226 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
231 | 227 | } | |
232 | 228 | deleteKeys | |
233 | 229 | } | |
234 | 230 | else throw("Only admin can call this function") | |
235 | 231 | ||
236 | 232 | ||
237 | 233 | ||
238 | 234 | @Callable(i) | |
239 | 235 | func issueToken (name,description,quantity,decimals) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
240 | 236 | then [Issue(name, description, quantity, decimals, true, unit, 0)] | |
241 | 237 | else throw("Only admin can call this function") | |
242 | 238 | ||
243 | 239 | ||
244 | 240 | ||
245 | 241 | @Callable(a8) | |
246 | 242 | func call () = [DeleteEntry("3PPH7x7iqobW5ziyiRCic19rQqKr6nPYaK1_3N5viYFhnu1ew4FRZ9nujme9edr918FkT1a_current_reward")] | |
247 | 243 | ||
248 | 244 | ||
249 | 245 | ||
250 | 246 | @Callable(i) | |
251 | 247 | func deposit (pool) = if ((size(i.payments) != 1)) | |
252 | 248 | then throw("One attached payment expected") | |
253 | 249 | else { | |
254 | 250 | let amount = i.payments[0].amount | |
255 | 251 | let assetId = i.payments[0].assetId | |
256 | 252 | let assetIdString = match assetId { | |
257 | 253 | case id: ByteVector => | |
258 | 254 | toBase58String(id) | |
259 | 255 | case _ => | |
260 | 256 | throw("Match error") | |
261 | 257 | } | |
262 | 258 | if ((0 >= amount)) | |
263 | 259 | then throw(("Deposit amount must be positive. Actual: " + toString(amount))) | |
264 | 260 | else { | |
265 | 261 | let poolAmountKey = (pool + "_asset_balance") | |
266 | 262 | let userAddress = toString(i.caller) | |
267 | 263 | let userPoolAmountKey = (((pool + "_") + userAddress) + "_asset_balance") | |
268 | 264 | let dAppAssetAddress = getDAppAssetAddress(pool) | |
269 | 265 | let liquidutyAssetAddress = match getString((pool + "_liquidity_token")) { | |
270 | 266 | case string: String => | |
271 | 267 | string | |
272 | 268 | case nothing => | |
273 | 269 | throw("You try to deposit on unsupported pool") | |
274 | 270 | } | |
275 | 271 | if (isPoolActive(pool)) | |
276 | 272 | then { | |
277 | 273 | let liquidityTokenDecimal = match assetInfo(fromBase58String(liquidutyAssetAddress)) { | |
278 | 274 | case asset: Asset => | |
279 | 275 | asset.decimals | |
280 | 276 | case _ => | |
281 | 277 | throw("Can't find asset") | |
282 | 278 | } | |
283 | 279 | if ((liquidutyAssetAddress != assetIdString)) | |
284 | 280 | then throw("You attached wrong liquidity token from Swop.fi") | |
285 | 281 | else { | |
286 | 282 | let poolAmount = getIntegerValue(this, poolAmountKey) | |
287 | 283 | let userAmount = match getInteger(userPoolAmountKey) { | |
288 | 284 | case int: Int => | |
289 | 285 | int | |
290 | 286 | case nothing => | |
291 | 287 | 0 | |
292 | 288 | } | |
293 | 289 | let userAmountWithoutFee = ((amount - fraction(amount, 1, depositFee, HALFUP)) - fraction(amount, 1, controllerFee, HALFUP)) | |
294 | 290 | let transferToUserAmount = transferToUser(userAmountWithoutFee, fromBase58String(dAppAssetAddress), pool, depositType) | |
295 | 291 | let fee = (amount - userAmountWithoutFee) | |
296 | 292 | let newPoolAmount = ((poolAmount + amount) - fee) | |
297 | 293 | let newUserPoolAmount = (userAmount + transferToUserAmount) | |
298 | 294 | let lockTokensKey = (((((pool + "_") + userAddress) + "_") + toBase58String(i.transactionId)) + "_locked") | |
299 | 295 | [Reissue(fromBase58String(dAppAssetAddress), transferToUserAmount, true), ScriptTransfer(i.caller, transferToUserAmount, fromBase58String(dAppAssetAddress)), ScriptTransfer(govermanceAddress, fee, fromBase58String(liquidutyAssetAddress)), IntegerEntry(lockTokensKey, userAmountWithoutFee), IntegerEntry(poolAmountKey, newPoolAmount), IntegerEntry(userPoolAmountKey, newUserPoolAmount)] | |
300 | 296 | } | |
301 | 297 | } | |
302 | 298 | else throw("Pool is not active!") | |
303 | 299 | } | |
304 | 300 | } | |
305 | 301 | ||
306 | 302 | ||
307 | 303 | ||
308 | 304 | @Callable(i) | |
305 | + | func initWithdraw (pool) = if ((size(i.payments) != 1)) | |
306 | + | then throw("One attached payment expected") | |
307 | + | else { | |
308 | + | let amount = i.payments[0].amount | |
309 | + | let assetId = i.payments[0].assetId | |
310 | + | let assetIdString = match assetId { | |
311 | + | case id: ByteVector => | |
312 | + | toBase58String(id) | |
313 | + | case _ => | |
314 | + | throw("Match error") | |
315 | + | } | |
316 | + | if ((0 >= amount)) | |
317 | + | then throw(("Withraw amount must be positive. Actual: " + toString(amount))) | |
318 | + | else if (isPoolActive(pool)) | |
319 | + | then { | |
320 | + | let userAddress = toString(i.caller) | |
321 | + | let transferToUserAmount = transferToUser(amount, fromBase58String(assetIdString), pool, withdrawType) | |
322 | + | let userRecordKey = userWithdrawKey(pool, userAddress) | |
323 | + | [IntegerEntry(userRecordKey, transferToUserAmount)] | |
324 | + | } | |
325 | + | else throw("Pool is not active!") | |
326 | + | } | |
327 | + | ||
328 | + | ||
329 | + | ||
330 | + | @Callable(i) | |
309 | 331 | func withdraw (pool) = if ((size(i.payments) != 1)) | |
310 | 332 | then throw("One attached payment expected") | |
311 | 333 | else { | |
312 | 334 | let amount = i.payments[0].amount | |
313 | 335 | let assetId = i.payments[0].assetId | |
314 | 336 | let assetIdString = match assetId { | |
315 | 337 | case id: ByteVector => | |
316 | 338 | toBase58String(id) | |
317 | 339 | case _ => | |
318 | 340 | throw("Match error") | |
319 | 341 | } | |
320 | 342 | if ((0 >= amount)) | |
321 | 343 | then throw(("Deposit amount must be positive. Actual: " + toString(amount))) | |
322 | 344 | else if (isPoolActive(pool)) | |
323 | 345 | then { | |
324 | 346 | let poolAmountKey = (pool + "_asset_balance") | |
325 | 347 | let userAddress = toString(i.caller) | |
326 | 348 | let userPoolAmountKey = (((pool + "_") + userAddress) + "_asset_balance") | |
327 | 349 | let userAmount = match getInteger(userPoolAmountKey) { | |
328 | 350 | case int: Int => | |
329 | 351 | int | |
330 | 352 | case nothing => | |
331 | 353 | 0 | |
332 | 354 | } | |
333 | 355 | let dAppAssetAddress = getDAppAssetAddress(pool) | |
334 | 356 | let liquidutyAssetAddress = getLiquidutyAssetAddress(pool) | |
335 | 357 | let poolAmount = getIntegerValue(this, poolAmountKey) | |
336 | 358 | let transferToUserAmount = transferToUser(amount, fromBase58String(assetIdString), pool, withdrawType) | |
337 | 359 | let newPoolAmount = (poolAmount - amount) | |
338 | 360 | let newUserPoolAmount = (userAmount - amount) | |
339 | 361 | [Burn(fromBase58String(dAppAssetAddress), amount), ScriptTransfer(i.caller, transferToUserAmount, fromBase58String(liquidutyAssetAddress)), IntegerEntry(poolAmountKey, newPoolAmount), IntegerEntry(userPoolAmountKey, newUserPoolAmount)] | |
340 | 362 | } | |
341 | 363 | else throw("Pool is not active!") | |
342 | 364 | } | |
343 | 365 | ||
344 | 366 | ||
345 | 367 | ||
346 | 368 | @Callable(i) | |
347 | 369 | func poolActivating (pools,statuses) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
348 | 370 | then { | |
349 | 371 | func generatePoolActiveKeys (accumulated,pool) = { | |
350 | 372 | let poolIndex = value(indexOf(pools, pool)) | |
351 | 373 | let status = statuses[poolIndex] | |
352 | 374 | BooleanEntry((pool + "_active"), status) :: accumulated | |
353 | 375 | } | |
354 | 376 | ||
355 | 377 | let poolActiveKeys = { | |
356 | 378 | let $l = pools | |
357 | 379 | let $s = size($l) | |
358 | 380 | let $acc0 = nil | |
359 | 381 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
360 | 382 | then $a | |
361 | 383 | else generatePoolActiveKeys($a, $l[$i]) | |
362 | 384 | ||
363 | 385 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
364 | 386 | then $a | |
365 | 387 | else throw("List size exceeds 100") | |
366 | 388 | ||
367 | 389 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
368 | 390 | } | |
369 | 391 | poolActiveKeys | |
370 | 392 | } | |
371 | 393 | else throw("Only admin can call this function") | |
372 | 394 | ||
373 | 395 | ||
374 | 396 | @Verifier(tx) | |
375 | 397 | func verify () = match tx { | |
376 | 398 | case inv: InvokeScriptTransaction => | |
377 | 399 | let lockShareTokens = if ((inv.dApp == farmingAddress)) | |
378 | 400 | then if (if ((inv.function == "lockShareTokens")) | |
379 | 401 | then true | |
380 | 402 | else (inv.function == "claim")) | |
381 | 403 | then true | |
382 | 404 | else (inv.function == "withdrawShareTokens") | |
383 | 405 | else false | |
384 | 406 | let lockSwop = if ((inv.dApp == swopFiGovermanceAddress)) | |
385 | 407 | then if ((inv.function == "lockSWOP")) | |
386 | 408 | then true | |
387 | 409 | else (inv.function == "withdrawSWOP") | |
388 | 410 | else false | |
389 | 411 | let dAppAddress = match inv.dApp { | |
390 | 412 | case dApp: Address => | |
391 | 413 | toString(dApp) | |
392 | 414 | case _ => | |
393 | 415 | throw("Transaction must have only address") | |
394 | 416 | } | |
395 | 417 | let poolFunctions = if (containsElement(swopFiPools, dAppAddress)) | |
396 | 418 | then containsElement(swopFiFunctions, inv.function) | |
397 | 419 | else false | |
398 | 420 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
399 | 421 | then true | |
400 | 422 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
401 | 423 | then true | |
402 | 424 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey4)) | |
403 | 425 | then true | |
404 | 426 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
405 | 427 | if (if (if (lockShareTokens) | |
406 | 428 | then true | |
407 | 429 | else poolFunctions) | |
408 | 430 | then true | |
409 | 431 | else lockSwop) | |
410 | 432 | then signedByAdmin | |
411 | 433 | else false | |
412 | 434 | case _ => | |
413 | 435 | let adm1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
414 | 436 | then 1 | |
415 | 437 | else 0 | |
416 | 438 | let adm2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
417 | 439 | then 1 | |
418 | 440 | else 0 | |
419 | 441 | let adm3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
420 | 442 | then 1 | |
421 | 443 | else 0 | |
422 | 444 | (((adm1Signed + adm2Signed) + adm3Signed) >= 2) | |
423 | 445 | } | |
424 | 446 |
github/deemru/w8io/026f985 74.05 ms ◑