tx · 7UzCmEuo1vb2Y9oB5t1qBigPreAN8YpNZzPGPWf8jjBt

3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph:  -0.01400000 Waves

2021.11.08 21:21 [1782386] smart account 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph > SELF 0.00000000 Waves

{ "type": 13, "id": "7UzCmEuo1vb2Y9oB5t1qBigPreAN8YpNZzPGPWf8jjBt", "fee": 1400000, "feeAssetId": null, "timestamp": 1636395761292, "version": 2, "chainId": 84, "sender": "3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph", "senderPublicKey": "G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD", "proofs": [ "3xPdSh2CNNWZmUKmqaqqw1xaxgx3QQjckQkiKQCqm1T84jVd3SiQJQXF4ic9TQzuK58pPEq9RUfV2bMdxw1WLP8G" ], "script": "base64:AAIFAAAAAAAAACEIAhIAEgYKBBgYGBESBgoECAgBARIAEgMKAQgSBAoCCAEAAAAGAAAAAApkZXBvc2l0RmVlAAAAAAAAAAPoAAAAAA1jb250cm9sbGVyRmVlAAAAAAAAACcQAAAAAAtwbGF0Zm9ybUZlZQAAAAAAAAAnEAAAAAAMYWRtaW5QdWJLZXkxAQAAACDgkMh3M2mpU305XK7y5b9J+9C9m7ycRhB7Y2h8D+QzGgAAAAAMYWRtaW5QdWJLZXkyAQAAACDgkMh3M2mpU305XK7y5b9J+9C9m7ycRhB7Y2h8D+QzGgAAAAAMYWRtaW5QdWJLZXkzAQAAACDgkMh3M2mpU305XK7y5b9J+9C9m7ycRhB7Y2h8D+QzGgAAAAYAAAACYTgBAAAABGluaXQAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAADEzUFBIN3g3aXFvYlc1eml5aVJDaWMxOXJRcUtyNm5QWWFLMV9hc3NldF9iYWxhbmNlAAAAAAAAbdStBQAAAANuaWwAAAABaQEAAAAIYWRkUG9vbHMAAAAEAAAABXBvb2xzA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AAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAQYW1vdW50V2l0aG91dEZlZQkAAlkAAAABBQAAABVsaXF1aWR1dHlBc3NldEFkZHJlc3MJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAADXBvb2xBbW91bnRLZXkFAAAADW5ld1Bvb2xBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAEXVzZXJQb29sQW1vdW50S2V5BQAAABFuZXdVc2VyUG9vbEFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAARdXNlclBvb2xFYXJuZWRLZXkFAAAAD3VzZXJFYXJuZWRUb3RhbAUAAAADbmlsCQAAAgAAAAECAAAAJllvdSBoYXZlIG5vdCBzdWNoIGJhbGFuY2UgZm9yIHdpdGhkcmF3AAAAAQAAAAJiNgEAAAACYjcAAAAACQAB9AAAAAMIBQAAAAJiNgAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmI2AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAmI2AAAAD3NlbmRlclB1YmxpY0tleZtb+6g=", "height": 1782386, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7G1AZqKYvvbGPzCaSmSpawCCNuhmfkYoiD3qPr8VU4T6 Next: 4ndh7wEkBieQqVzM6ZvdkwRR2qHfgbjecY1CFgSvzYwT Diff:
OldNewDifferences
128128
129129 @Callable(a8)
130130 func call () = {
131- let pmtAmountA = 99999180
132- let pmtAmountB = 605030
131+ let pmtAmountA = 10
132+ let pmtAmountB = 1
133133 let pmtDecimalsA = 8
134134 let pmtDecimalsB = 6
135135 let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let depositFee = 1000
55
66 let controllerFee = 10000
77
88 let platformFee = 10000
99
1010 let adminPubKey1 = base58'G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD'
1111
1212 let adminPubKey2 = base58'G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD'
1313
1414 let adminPubKey3 = base58'G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD'
1515
1616 @Callable(a8)
1717 func init () = [IntegerEntry("3PPH7x7iqobW5ziyiRCic19rQqKr6nPYaK1_asset_balance", 7197869)]
1818
1919
2020
2121 @Callable(i)
2222 func addPools (pools,liquidityTokens,serviceTokens,liquidityTokenDecimals) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
2323 then {
2424 func generatePoolKeys (accumulated,pool) = IntegerEntry((pool + "_asset_balance"), 0) :: accumulated
2525
2626 func generatePoolLiquidityTokenKeys (accumulated,pool) = {
2727 let poolIndex = value(indexOf(pools, pool))
2828 let liquidityToken = liquidityTokens[poolIndex]
2929 StringEntry((pool + "_liquidity_token"), liquidityToken) :: accumulated
3030 }
3131
3232 func generatePoolServiceTokenKeys (accumulated,pool) = {
3333 let poolIndex = value(indexOf(pools, pool))
3434 let liquidityToken = serviceTokens[poolIndex]
3535 StringEntry((pool + "_service_token"), liquidityToken) :: accumulated
3636 }
3737
3838 func generatePoolLiquidityTokenDecimalKeys (accumulated,pool) = {
3939 let poolIndex = value(indexOf(pools, pool))
4040 let liquidityToken = liquidityTokenDecimals[poolIndex]
4141 IntegerEntry((pool + "_service_token"), liquidityToken) :: accumulated
4242 }
4343
4444 func generatePoolActiveKeys (accumulated,pool) = BooleanEntry((pool + "_active"), true) :: accumulated
4545
4646 let poolBalanceKeys = {
4747 let $l = pools
4848 let $s = size($l)
4949 let $acc0 = nil
5050 func 1 ($a,$i) = if (($i >= $s))
5151 then $a
5252 else generatePoolKeys($a, $l[$i])
5353
5454 func 2 ($a,$i) = if (($i >= $s))
5555 then $a
5656 else throw("List size exceeds 20")
5757
5858 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)
5959 }
6060 let poolLiquidityTokenKeys = {
6161 let $l = pools
6262 let $s = size($l)
6363 let $acc0 = nil
6464 func 1 ($a,$i) = if (($i >= $s))
6565 then $a
6666 else generatePoolLiquidityTokenKeys($a, $l[$i])
6767
6868 func 2 ($a,$i) = if (($i >= $s))
6969 then $a
7070 else throw("List size exceeds 20")
7171
7272 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)
7373 }
7474 let poolServiceTokenKeys = {
7575 let $l = pools
7676 let $s = size($l)
7777 let $acc0 = nil
7878 func 1 ($a,$i) = if (($i >= $s))
7979 then $a
8080 else generatePoolServiceTokenKeys($a, $l[$i])
8181
8282 func 2 ($a,$i) = if (($i >= $s))
8383 then $a
8484 else throw("List size exceeds 20")
8585
8686 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)
8787 }
8888 let poolLiquidityTokenDecimalKeys = {
8989 let $l = pools
9090 let $s = size($l)
9191 let $acc0 = nil
9292 func 1 ($a,$i) = if (($i >= $s))
9393 then $a
9494 else generatePoolLiquidityTokenDecimalKeys($a, $l[$i])
9595
9696 func 2 ($a,$i) = if (($i >= $s))
9797 then $a
9898 else throw("List size exceeds 20")
9999
100100 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)
101101 }
102102 let poolActiveKeys = {
103103 let $l = pools
104104 let $s = size($l)
105105 let $acc0 = nil
106106 func 1 ($a,$i) = if (($i >= $s))
107107 then $a
108108 else generatePoolActiveKeys($a, $l[$i])
109109
110110 func 2 ($a,$i) = if (($i >= $s))
111111 then $a
112112 else throw("List size exceeds 20")
113113
114114 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)
115115 }
116116 ((((poolBalanceKeys ++ poolLiquidityTokenKeys) ++ poolServiceTokenKeys) ++ poolLiquidityTokenDecimalKeys) ++ poolActiveKeys)
117117 }
118118 else throw("Only admin can call this function")
119119
120120
121121
122122 @Callable(i)
123123 func issueToken (name,description,quantity,decimals) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
124124 then [Issue(name, description, quantity, decimals, true, unit, 0)]
125125 else throw("Only admin can call this function")
126126
127127
128128
129129 @Callable(a8)
130130 func call () = {
131- let pmtAmountA = 99999180
132- let pmtAmountB = 605030
131+ let pmtAmountA = 10
132+ let pmtAmountB = 1
133133 let pmtDecimalsA = 8
134134 let pmtDecimalsB = 6
135135 let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2)
136136 let a9 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN)
137137 let a10 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN)
138138 let third = pow(10, 0, shareDecimals, 0, 0, DOWN)
139139 let fouth = fraction(a9, a10, third)
140140 [IntegerEntry("fisrt", a9), IntegerEntry("second", a10), IntegerEntry("third", third), IntegerEntry("fouth", fouth)]
141141 }
142142
143143
144144
145145 @Callable(i)
146146 func deposit (pool) = {
147147 let amount = i.payments[0].amount
148148 let assetId = i.payments[0].assetId
149149 let assetIdString = match assetId {
150150 case id: ByteVector =>
151151 toBase58String(id)
152152 case _ =>
153153 throw("Match error")
154154 }
155155 if ((size(i.payments) != 1))
156156 then throw("One attached payment expected")
157157 else if ((0 >= amount))
158158 then throw(("Deposit amount must be positive. Actual: " + toString(amount)))
159159 else {
160160 let poolAmountKey = (pool + "_asset_balance")
161161 let userAddress = toString(i.caller)
162162 let userPoolAmountKey = (((pool + "_") + userAddress) + "_asset_balance")
163163 let dAppAssetAddress = match getString((pool + "_service_token")) {
164164 case string: String =>
165165 string
166166 case nothing =>
167167 throw("You try to deposit on unsupported pool")
168168 }
169169 let liquidutyAssetAddress = getStringValue(this, (pool + "_liquidity_token"))
170170 let liquidityTokenDecimal = match assetInfo(fromBase58String(liquidutyAssetAddress)) {
171171 case asset: Asset =>
172172 asset.decimals
173173 case _ =>
174174 throw("Can't find asset")
175175 }
176176 if ((liquidutyAssetAddress != assetIdString))
177177 then throw("You attached wrong liquidity token from Swop.fi")
178178 else {
179179 let poolAmount = getIntegerValue(this, poolAmountKey)
180180 let userAmount = match getInteger(userPoolAmountKey) {
181181 case int: Int =>
182182 int
183183 case nothing =>
184184 0
185185 }
186186 let newPoolAmount = (poolAmount + amount)
187187 let userAmountWithoutFee = ((amount - fraction(amount, 1, depositFee, HALFUP)) - fraction(amount, 1, controllerFee, HALFUP))
188188 let newUserPoolAmount = (userAmount + userAmountWithoutFee)
189189 [Reissue(fromBase58String(dAppAssetAddress), userAmountWithoutFee, true), ScriptTransfer(i.caller, userAmountWithoutFee, fromBase58String(dAppAssetAddress)), IntegerEntry(poolAmountKey, newPoolAmount), IntegerEntry(userPoolAmountKey, newUserPoolAmount)]
190190 }
191191 }
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func withdraw (pool,userEarned) = {
198198 let amount = i.payments[0].amount
199199 let assetId = i.payments[0].assetId
200200 let assetIdString = match assetId {
201201 case id: ByteVector =>
202202 toBase58String(id)
203203 case _ =>
204204 throw("Match error")
205205 }
206206 if ((size(i.payments) != 1))
207207 then throw("One attached payment expected")
208208 else if ((0 >= amount))
209209 then throw(("Withdraw amount must be positive. Actual: " + toString(amount)))
210210 else {
211211 let poolAmountKey = (pool + "_asset_balance")
212212 let userAddress = toString(i.caller)
213213 let userPoolAmountKey = (((pool + "_") + userAddress) + "_asset_balance")
214214 let userPoolEarnedKey = (((pool + "_") + userAddress) + "_earned")
215215 let dAppAssetAddress = match getString((pool + "_service_token")) {
216216 case string: String =>
217217 string
218218 case nothing =>
219219 throw("You try to withdraw from unsupported pool")
220220 }
221221 if ((dAppAssetAddress != assetIdString))
222222 then throw("You attached an wrong token")
223223 else {
224224 let poolAmount = getIntegerValue(this, poolAmountKey)
225225 let userAmount = match getInteger(userPoolAmountKey) {
226226 case int: Int =>
227227 int
228228 case nothing =>
229229 0
230230 }
231231 let userEarnedBefore = match getInteger(userPoolEarnedKey) {
232232 case int: Int =>
233233 int
234234 case nothing =>
235235 0
236236 }
237237 let liquidutyAssetAddress = getStringValue(this, (pool + "_liquidity_token"))
238238 let liquidityTokenDecimal = match assetInfo(fromBase58String(liquidutyAssetAddress)) {
239239 case asset: Asset =>
240240 asset.decimals
241241 case _ =>
242242 throw("Can't find asset")
243243 }
244244 let userEarnedTotal = (userEarned + userEarnedBefore)
245245 let amountWithoutFee = ((amount - fraction(amount, 1, platformFee, HALFUP)) - fraction(amount, 1, controllerFee, HALFUP))
246246 let newPoolAmount = (poolAmount - amountWithoutFee)
247247 if ((userAmount >= amount))
248248 then {
249249 let newUserPoolAmount = (userAmount - amountWithoutFee)
250250 [Burn(fromBase58String(dAppAssetAddress), amountWithoutFee), ScriptTransfer(i.caller, amountWithoutFee, fromBase58String(liquidutyAssetAddress)), IntegerEntry(poolAmountKey, newPoolAmount), IntegerEntry(userPoolAmountKey, newUserPoolAmount), IntegerEntry(userPoolEarnedKey, userEarnedTotal)]
251251 }
252252 else throw("You have not such balance for withdraw")
253253 }
254254 }
255255 }
256256
257257
258258 @Verifier(b6)
259259 func b7 () = sigVerify(b6.bodyBytes, b6.proofs[0], b6.senderPublicKey)
260260

github/deemru/w8io/169f3d6 
62.65 ms