tx · 6Myc93wFFRxHSQhbtmajAaoerkfsmxurwsBcMYUs2yd8 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph: -0.01400000 Waves 2021.11.19 16:14 [1797969] smart account 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph > SELF 0.00000000 Waves
{ "type": 13, "id": "6Myc93wFFRxHSQhbtmajAaoerkfsmxurwsBcMYUs2yd8", "fee": 1400000, "feeAssetId": null, "timestamp": 1637327697933, "version": 2, "chainId": 84, "sender": "3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph", "senderPublicKey": "G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD", "proofs": [ "3xF2jdvsuWYMmabnZHFrVvrQjUUumhuJwBzrCZweuwGpEZ4qm53obdjtv3bQJJe1Kw6omRuuJK5XH278L9zcPpAX" ], "script": "base64:AAIFAAAAAAAAACQIAhIGCgQYGBgREgMKARgSBgoECAgBARIAEgMKAQgSBAoCCAEAAAAGAAAAAApkZXBvc2l0RmVlAAAAAAAAAAPoAAAAAA1jb250cm9sbGVyRmVlAAAAAAAAACcQAAAAAAtwbGF0Zm9ybUZlZQAAAAAAAAAnEAAAAAAMYWRtaW5QdWJLZXkxAQAAACBML0XVfOoUYZ0u5wVeWtFjxl6V510E+3IIEVV8EjlQeAAAAAAMYWRtaW5QdWJLZXkyAQAAACBML0XVfOoUYZ0u5wVeWtFjxl6V510E+3IIEVV8EjlQeAAAAAAMYWRtaW5QdWJLZXkzAQAAACBML0XVfOoUYZ0u5wVeWtFjxl6V510E+3IIEVV8EjlQeAAAAAYAAAABaQEAAAAIYWRkUG9vbHMAAAAEAAAABXBvb2xzAAAAD2xpcXVpZGl0eVRva2VucwAAAA1zZXJ2aWNlVG9rZW5zAAAAFmxpcXVpZGl0eVRva2VuRGVjaW1hbHMDCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgkABEwAAAACBQAAAAxhZG1pblB1YktleTEJAARMAAAAAgUAAAAMYWR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A9zZW5kZXJQdWJsaWNLZXkp0COZ", "height": 1797969, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EtXsXcPqUCutpDtfekrpKKwyMDPfvV1U5vs8Zo2kwQ1r Next: D6TzzohnNh6QHa2XbewLRNBPPnQUxhD6vTdhnfVTcvn3 Diff:
Old | New | Differences | |
---|---|---|---|
109 | 109 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
110 | 110 | } | |
111 | 111 | ((((poolBalanceKeys ++ poolLiquidityTokenKeys) ++ poolServiceTokenKeys) ++ poolLiquidityTokenDecimalKeys) ++ poolActiveKeys) | |
112 | + | } | |
113 | + | else throw("Only admin can call this function") | |
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | @Callable(i) | |
118 | + | func deleteDepositLockRecord (records) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
119 | + | then { | |
120 | + | func generateDeletingKeys (accumulated,record) = DeleteEntry((record + "_locked")) :: accumulated | |
121 | + | ||
122 | + | let deleteKeys = { | |
123 | + | let $l = records | |
124 | + | let $s = size($l) | |
125 | + | let $acc0 = nil | |
126 | + | func 1 ($a,$i) = if (($i >= $s)) | |
127 | + | then $a | |
128 | + | else generateDeletingKeys($a, $l[$i]) | |
129 | + | ||
130 | + | func 2 ($a,$i) = if (($i >= $s)) | |
131 | + | then $a | |
132 | + | else throw("List size exceeds 100") | |
133 | + | ||
134 | + | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(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) | |
135 | + | } | |
136 | + | deleteKeys | |
112 | 137 | } | |
113 | 138 | else throw("Only admin can call this function") | |
114 | 139 |
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'68Po1k24uP6goKr7RDmXPg4QkMiKuyTMEirao14rif8s' | |
13 | 13 | ||
14 | 14 | let adminPubKey3 = base58'68Po1k24uP6goKr7RDmXPg4QkMiKuyTMEirao14rif8s' | |
15 | 15 | ||
16 | 16 | @Callable(i) | |
17 | 17 | func addPools (pools,liquidityTokens,serviceTokens,liquidityTokenDecimals) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
18 | 18 | then { | |
19 | 19 | func generatePoolKeys (accumulated,pool) = IntegerEntry((pool + "_asset_balance"), 0) :: accumulated | |
20 | 20 | ||
21 | 21 | func generatePoolLiquidityTokenKeys (accumulated,pool) = { | |
22 | 22 | let poolIndex = value(indexOf(pools, pool)) | |
23 | 23 | let liquidityToken = liquidityTokens[poolIndex] | |
24 | 24 | StringEntry((pool + "_liquidity_token"), liquidityToken) :: accumulated | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | func generatePoolServiceTokenKeys (accumulated,pool) = { | |
28 | 28 | let poolIndex = value(indexOf(pools, pool)) | |
29 | 29 | let liquidityToken = serviceTokens[poolIndex] | |
30 | 30 | StringEntry((pool + "_service_token"), liquidityToken) :: accumulated | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | func generatePoolLiquidityTokenDecimalKeys (accumulated,pool) = { | |
34 | 34 | let poolIndex = value(indexOf(pools, pool)) | |
35 | 35 | let liquidityToken = liquidityTokenDecimals[poolIndex] | |
36 | 36 | IntegerEntry((pool + "_service_token"), liquidityToken) :: accumulated | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | func generatePoolActiveKeys (accumulated,pool) = BooleanEntry((pool + "_active"), true) :: accumulated | |
40 | 40 | ||
41 | 41 | let poolBalanceKeys = { | |
42 | 42 | let $l = pools | |
43 | 43 | let $s = size($l) | |
44 | 44 | let $acc0 = nil | |
45 | 45 | func 1 ($a,$i) = if (($i >= $s)) | |
46 | 46 | then $a | |
47 | 47 | else generatePoolKeys($a, $l[$i]) | |
48 | 48 | ||
49 | 49 | func 2 ($a,$i) = if (($i >= $s)) | |
50 | 50 | then $a | |
51 | 51 | else throw("List size exceeds 20") | |
52 | 52 | ||
53 | 53 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
54 | 54 | } | |
55 | 55 | let poolLiquidityTokenKeys = { | |
56 | 56 | let $l = pools | |
57 | 57 | let $s = size($l) | |
58 | 58 | let $acc0 = nil | |
59 | 59 | func 1 ($a,$i) = if (($i >= $s)) | |
60 | 60 | then $a | |
61 | 61 | else generatePoolLiquidityTokenKeys($a, $l[$i]) | |
62 | 62 | ||
63 | 63 | func 2 ($a,$i) = if (($i >= $s)) | |
64 | 64 | then $a | |
65 | 65 | else throw("List size exceeds 20") | |
66 | 66 | ||
67 | 67 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
68 | 68 | } | |
69 | 69 | let poolServiceTokenKeys = { | |
70 | 70 | let $l = pools | |
71 | 71 | let $s = size($l) | |
72 | 72 | let $acc0 = nil | |
73 | 73 | func 1 ($a,$i) = if (($i >= $s)) | |
74 | 74 | then $a | |
75 | 75 | else generatePoolServiceTokenKeys($a, $l[$i]) | |
76 | 76 | ||
77 | 77 | func 2 ($a,$i) = if (($i >= $s)) | |
78 | 78 | then $a | |
79 | 79 | else throw("List size exceeds 20") | |
80 | 80 | ||
81 | 81 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
82 | 82 | } | |
83 | 83 | let poolLiquidityTokenDecimalKeys = { | |
84 | 84 | let $l = pools | |
85 | 85 | let $s = size($l) | |
86 | 86 | let $acc0 = nil | |
87 | 87 | func 1 ($a,$i) = if (($i >= $s)) | |
88 | 88 | then $a | |
89 | 89 | else generatePoolLiquidityTokenDecimalKeys($a, $l[$i]) | |
90 | 90 | ||
91 | 91 | func 2 ($a,$i) = if (($i >= $s)) | |
92 | 92 | then $a | |
93 | 93 | else throw("List size exceeds 20") | |
94 | 94 | ||
95 | 95 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
96 | 96 | } | |
97 | 97 | let poolActiveKeys = { | |
98 | 98 | let $l = pools | |
99 | 99 | let $s = size($l) | |
100 | 100 | let $acc0 = nil | |
101 | 101 | func 1 ($a,$i) = if (($i >= $s)) | |
102 | 102 | then $a | |
103 | 103 | else generatePoolActiveKeys($a, $l[$i]) | |
104 | 104 | ||
105 | 105 | func 2 ($a,$i) = if (($i >= $s)) | |
106 | 106 | then $a | |
107 | 107 | else throw("List size exceeds 20") | |
108 | 108 | ||
109 | 109 | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
110 | 110 | } | |
111 | 111 | ((((poolBalanceKeys ++ poolLiquidityTokenKeys) ++ poolServiceTokenKeys) ++ poolLiquidityTokenDecimalKeys) ++ poolActiveKeys) | |
112 | + | } | |
113 | + | else throw("Only admin can call this function") | |
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | @Callable(i) | |
118 | + | func deleteDepositLockRecord (records) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
119 | + | then { | |
120 | + | func generateDeletingKeys (accumulated,record) = DeleteEntry((record + "_locked")) :: accumulated | |
121 | + | ||
122 | + | let deleteKeys = { | |
123 | + | let $l = records | |
124 | + | let $s = size($l) | |
125 | + | let $acc0 = nil | |
126 | + | func 1 ($a,$i) = if (($i >= $s)) | |
127 | + | then $a | |
128 | + | else generateDeletingKeys($a, $l[$i]) | |
129 | + | ||
130 | + | func 2 ($a,$i) = if (($i >= $s)) | |
131 | + | then $a | |
132 | + | else throw("List size exceeds 100") | |
133 | + | ||
134 | + | 2(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(1(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) | |
135 | + | } | |
136 | + | deleteKeys | |
112 | 137 | } | |
113 | 138 | else throw("Only admin can call this function") | |
114 | 139 | ||
115 | 140 | ||
116 | 141 | ||
117 | 142 | @Callable(i) | |
118 | 143 | func issueToken (name,description,quantity,decimals) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
119 | 144 | then [Issue(name, description, quantity, decimals, true, unit, 0)] | |
120 | 145 | else throw("Only admin can call this function") | |
121 | 146 | ||
122 | 147 | ||
123 | 148 | ||
124 | 149 | @Callable(a8) | |
125 | 150 | func call () = { | |
126 | 151 | let pmtAmountA = 10 | |
127 | 152 | let pmtAmountB = 1 | |
128 | 153 | let pmtDecimalsA = 8 | |
129 | 154 | let pmtDecimalsB = 6 | |
130 | 155 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
131 | 156 | let a9 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN) | |
132 | 157 | let a10 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN) | |
133 | 158 | let third = pow(10, 0, shareDecimals, 0, 0, DOWN) | |
134 | 159 | let fouth = fraction(a9, a10, third) | |
135 | 160 | [IntegerEntry("fisrt", a9), IntegerEntry("second", a10), IntegerEntry("third", third), IntegerEntry("fouth", fouth)] | |
136 | 161 | } | |
137 | 162 | ||
138 | 163 | ||
139 | 164 | ||
140 | 165 | @Callable(i) | |
141 | 166 | func deposit (pool) = if ((size(i.payments) != 1)) | |
142 | 167 | then throw("One attached payment expected") | |
143 | 168 | else { | |
144 | 169 | let amount = i.payments[0].amount | |
145 | 170 | let assetId = i.payments[0].assetId | |
146 | 171 | let assetIdString = match assetId { | |
147 | 172 | case id: ByteVector => | |
148 | 173 | toBase58String(id) | |
149 | 174 | case _ => | |
150 | 175 | throw("Match error") | |
151 | 176 | } | |
152 | 177 | if ((0 >= amount)) | |
153 | 178 | then throw(("Deposit amount must be positive. Actual: " + toString(amount))) | |
154 | 179 | else { | |
155 | 180 | let poolAmountKey = (pool + "_asset_balance") | |
156 | 181 | let userAddress = toString(i.caller) | |
157 | 182 | let userPoolAmountKey = (((pool + "_") + userAddress) + "_asset_balance") | |
158 | 183 | let dAppAssetAddress = match getString((pool + "_service_token")) { | |
159 | 184 | case string: String => | |
160 | 185 | string | |
161 | 186 | case nothing => | |
162 | 187 | throw("You try to deposit on unsupported pool") | |
163 | 188 | } | |
164 | 189 | let liquidutyAssetAddress = match getString((pool + "_liquidity_token")) { | |
165 | 190 | case string: String => | |
166 | 191 | string | |
167 | 192 | case nothing => | |
168 | 193 | throw("You try to deposit on unsupported pool") | |
169 | 194 | } | |
170 | 195 | let liquidityTokenDecimal = match assetInfo(fromBase58String(liquidutyAssetAddress)) { | |
171 | 196 | case asset: Asset => | |
172 | 197 | asset.decimals | |
173 | 198 | case _ => | |
174 | 199 | throw("Can't find asset") | |
175 | 200 | } | |
176 | 201 | if ((liquidutyAssetAddress != assetIdString)) | |
177 | 202 | then throw("You attached wrong liquidity token from Swop.fi") | |
178 | 203 | else { | |
179 | 204 | let poolAmount = getIntegerValue(this, poolAmountKey) | |
180 | 205 | let userAmount = match getInteger(userPoolAmountKey) { | |
181 | 206 | case int: Int => | |
182 | 207 | int | |
183 | 208 | case nothing => | |
184 | 209 | 0 | |
185 | 210 | } | |
186 | 211 | let newPoolAmount = (poolAmount + amount) | |
187 | 212 | let userAmountWithoutFee = ((amount - fraction(amount, 1, depositFee, HALFUP)) - fraction(amount, 1, controllerFee, HALFUP)) | |
188 | 213 | let newUserPoolAmount = (userAmount + userAmountWithoutFee) | |
189 | 214 | let lockTokensKey = (((((pool + "_") + userAddress) + "_") + toBase58String(i.transactionId)) + "_locked") | |
190 | 215 | [Reissue(fromBase58String(dAppAssetAddress), userAmountWithoutFee, true), ScriptTransfer(i.caller, userAmountWithoutFee, fromBase58String(dAppAssetAddress)), IntegerEntry(lockTokensKey, userAmountWithoutFee), IntegerEntry(poolAmountKey, newPoolAmount), IntegerEntry(userPoolAmountKey, newUserPoolAmount)] | |
191 | 216 | } | |
192 | 217 | } | |
193 | 218 | } | |
194 | 219 | ||
195 | 220 | ||
196 | 221 | ||
197 | 222 | @Callable(i) | |
198 | 223 | func withdraw (pool,amount) = if ((0 >= amount)) | |
199 | 224 | then throw(("Deposit amount must be positive. Actual: " + toString(amount))) | |
200 | 225 | else { | |
201 | 226 | let poolAmountKey = (pool + "_asset_balance") | |
202 | 227 | let userAddress = toString(i.caller) | |
203 | 228 | let userPoolAmountKey = (((pool + "_") + userAddress) + "_asset_balance") | |
204 | 229 | let dAppAssetAddress = match getString((pool + "_service_token")) { | |
205 | 230 | case string: String => | |
206 | 231 | string | |
207 | 232 | case nothing => | |
208 | 233 | throw("You try to withdraw from unsupported pool") | |
209 | 234 | } | |
210 | 235 | let liquidutyAssetAddress = match getString((pool + "_liquidity_token")) { | |
211 | 236 | case string: String => | |
212 | 237 | string | |
213 | 238 | case nothing => | |
214 | 239 | throw("You try to withdraw from unsupported pool") | |
215 | 240 | } | |
216 | 241 | let poolAmount = getIntegerValue(this, poolAmountKey) | |
217 | 242 | let userAmount = match getInteger(userPoolAmountKey) { | |
218 | 243 | case int: Int => | |
219 | 244 | int | |
220 | 245 | case nothing => | |
221 | 246 | 0 | |
222 | 247 | } | |
223 | 248 | let amountWithoutFee = ((amount - fraction(amount, 1, platformFee, HALFUP)) - fraction(amount, 1, controllerFee, HALFUP)) | |
224 | 249 | let newPoolAmount = (poolAmount - amountWithoutFee) | |
225 | 250 | if ((userAmount >= amount)) | |
226 | 251 | then { | |
227 | 252 | let newUserPoolAmount = (userAmount - amount) | |
228 | 253 | [Burn(fromBase58String(dAppAssetAddress), amountWithoutFee), ScriptTransfer(i.caller, amountWithoutFee, fromBase58String(liquidutyAssetAddress)), IntegerEntry(poolAmountKey, newPoolAmount), IntegerEntry(userPoolAmountKey, newUserPoolAmount)] | |
229 | 254 | } | |
230 | 255 | else throw("You have not such balance for withdraw") | |
231 | 256 | } | |
232 | 257 | ||
233 | 258 | ||
234 | 259 | @Verifier(b6) | |
235 | 260 | func b7 () = sigVerify(b6.bodyBytes, b6.proofs[0], b6.senderPublicKey) | |
236 | 261 |
github/deemru/w8io/169f3d6 70.33 ms ◑