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