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