tx · 41pzrk4UnNgV8y6aQtKoyrraLh7qBBdvMUXW3C7TFVGC

3N5oi7xosBdSwhbbWh3y2h9Jhx63owgkBFA:  -0.01400000 Waves

2021.04.06 18:04 [1470745] smart account 3N5oi7xosBdSwhbbWh3y2h9Jhx63owgkBFA > SELF 0.00000000 Waves

{ "type": 13, "id": "41pzrk4UnNgV8y6aQtKoyrraLh7qBBdvMUXW3C7TFVGC", "fee": 1400000, "feeAssetId": null, "timestamp": 1617721497256, "version": 2, "chainId": 84, "sender": "3N5oi7xosBdSwhbbWh3y2h9Jhx63owgkBFA", "senderPublicKey": "65cF9tPJrvN5N9ztRhFizUUozJ55EBouFSEn2DkYb1on", "proofs": [ "2hVjRjqmA6jNCffZcuGDxmnsVLUNrPKfQm6n2FBCHDfTjpP3N9JLmDM5b4QbeBMNDFt1asXGoBYhPSYHEmW96FU5" ], "script": "base64:AAIEAAAAAAAAABQIAhIAEgASABIAEgMKAQESAwoBAQAAABcAAAAAEnVzZG5EeXpBQmFsYW5jZUtleQIAAAAYdXNkbl9keXpfYV9hc3NldF9iYWxhbmNlAAAAABJ1c2RuRHl6QkJhbGFuY2VLZXkCAAAAGHVzZG5fZHl6X2JfYXNzZXRfYmFsYW5jZQAAAAARZXRoRHl6QUJhbGFuY2VLZXkCAAAAF2V0aF9keXpfYV9hc3NldF9iYWxhbmNlAAAAABFldGhEeXpCQmFsYW5jZUtleQIAAAAXZXRoX2R5el9iX2Fzc2V0X2JhbGFuY2UAAAAAFnVzZG5EeXpQYWlySXNBY3RpdmVLZXkCAAAAEnVzZG5fZHl6X2lzX2FjdGl2ZQAAAAAVZXRoRHl6UGFpcklzQWN0aXZlS2V5AgAAABFldGhfZHl6X2lzX2FjdGl2ZQAAAAAGZmVlS2V5AgAAAANmZWUAAAAADnRvdGFsRmVlRXRoS2V5AgAAAA10b3RhbF9mZWVfZXRoAAAAAA50b3RhbEZlZVVzZEtleQIAAAANdG90YWxfZmVlX3VzZAAAAAASdG90YWxGZWVEeXp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AQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAAt0b3RhbEZlZUtleQUAAAAIdG90YWxGZWUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAKZmVlQWRkcmVzcwUAAAAJZmVlQW1vdW50BQAAAAdhc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAHckFtb3VudAUAAAAIckFzc2V0SWQFAAAAA25pbAAAAABGEuDN", "height": 1470745, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BuotYgB9bJRHNKsb78Y2L1Lc179LjsgqjzLmYaWk7do Next: none Diff:
OldNewDifferences
120120 else if ((i.callerPublicKey != adminPublicKey))
121121 then throw("Only admin can activate pair")
122122 else {
123- let $t040204097 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
124- let pmtAmountA = $t040204097._1
125- let pmtAssetIdA = $t040204097._2
126- let $t041064183 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
127- let pmtAmountB = $t041064183._1
128- let pmtAssetIdB = $t041064183._2
123+ let $t039674044 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
124+ let pmtAmountA = $t039674044._1
125+ let pmtAssetIdA = $t039674044._2
126+ let $t040534130 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
127+ let pmtAmountB = $t040534130._1
128+ let pmtAssetIdB = $t040534130._2
129129 if ((pmtAssetIdA != usdnAssetId))
130130 then throw("A asset is not a usdn")
131131 else if ((pmtAssetIdB != dyzraptAssetId))
141141 else if ((i.callerPublicKey != adminPublicKey))
142142 then throw("Only admin can activate pair")
143143 else {
144- let $t049164993 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
145- let pmtAmountA = $t049164993._1
146- let pmtAssetIdA = $t049164993._2
147- let $t050025079 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
148- let pmtAmountB = $t050025079._1
149- let pmtAssetIdB = $t050025079._2
144+ let $t048634940 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
145+ let pmtAmountA = $t048634940._1
146+ let pmtAssetIdA = $t048634940._2
147+ let $t049495026 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
148+ let pmtAmountB = $t049495026._1
149+ let pmtAssetIdB = $t049495026._2
150150 if ((pmtAssetIdA != ethAssetId))
151151 then throw("A asset is not a eth")
152152 else if ((pmtAssetIdB != dyzraptAssetId))
162162 else if ((i.callerPublicKey != adminPublicKey))
163163 then throw("Only admin can add liquid")
164164 else {
165- let $t058065883 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166- let pmtAmountA = $t058065883._1
167- let pmtAssetIdA = $t058065883._2
168- let $t058925969 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
169- let pmtAmountB = $t058925969._1
170- let pmtAssetIdB = $t058925969._2
165+ let $t057535830 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166+ let pmtAmountA = $t057535830._1
167+ let pmtAssetIdA = $t057535830._2
168+ let $t058395916 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
169+ let pmtAmountB = $t058395916._1
170+ let pmtAssetIdB = $t058395916._2
171171 if ((pmtAssetIdA != usdnAssetId))
172172 then throw("A asset is not a usdn")
173173 else if ((pmtAssetIdB != dyzraptAssetId))
175175 else {
176176 let balanceA = getIntKeyData(usdnDyzABalanceKey)
177177 let balanceB = getIntKeyData(usdnDyzBBalanceKey)
178- let tokenRatio = fraction(fraction(balanceA, 100000000, pmtAmountA), 1000, fraction(balanceB, 100000000, pmtAmountB))
179- throw(("Incorrect assets amount: amounts must have the contract ratio " + toString(tokenRatio)))
178+[IntegerEntry(usdnDyzABalanceKey, (balanceA + pmtAmountA)), IntegerEntry(usdnDyzBBalanceKey, (balanceB + pmtAmountB))]
180179 }
181180 }
182181
188187 else if ((i.callerPublicKey != adminPublicKey))
189188 then throw("Only admin can add liquid")
190189 else {
191- let $t068216898 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
192- let pmtAmountA = $t068216898._1
193- let pmtAssetIdA = $t068216898._2
194- let $t069076984 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
195- let pmtAmountB = $t069076984._1
196- let pmtAssetIdB = $t069076984._2
190+ let $t066736750 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
191+ let pmtAmountA = $t066736750._1
192+ let pmtAssetIdA = $t066736750._2
193+ let $t067596836 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
194+ let pmtAmountB = $t067596836._1
195+ let pmtAssetIdB = $t067596836._2
197196 if ((pmtAssetIdA != ethAssetId))
198197 then throw("A asset is not a eth")
199198 else if ((pmtAssetIdB != dyzraptAssetId))
201200 else {
202201 let balanceA = getIntKeyData(ethDyzABalanceKey)
203202 let balanceB = getIntKeyData(ethDyzBBalanceKey)
204- let tokenRatio = fraction(fraction(balanceA, 100000000, pmtAmountA), 1000, fraction(balanceB, 100000000, pmtAmountB))
205- if ((tokenRatio > maxRatio))
206- then throw("Incorrect assets amount: amounts must have the contract ratio")
207- else [IntegerEntry(ethDyzABalanceKey, (balanceA + pmtAmountA)), IntegerEntry(ethDyzBBalanceKey, (balanceB + pmtAmountB))]
203+[IntegerEntry(ethDyzABalanceKey, (balanceA + pmtAmountA)), IntegerEntry(ethDyzBBalanceKey, (balanceB + pmtAmountB))]
208204 }
209205 }
210206
222218 else false)
223219 then throw("Only usdn and dyzrupt are supporting")
224220 else {
225- let $t082168312 = getUsdnDyzAmount(assetId, amount)
226- let feeAmount = $t082168312._1
227- let rAmount = $t082168312._2
228- let rAssetId = $t082168312._3
229- let newBalanceA = $t082168312._4
230- let newBalanceB = $t082168312._5
221+ let $t077557851 = getUsdnDyzAmount(assetId, amount)
222+ let feeAmount = $t077557851._1
223+ let rAmount = $t077557851._2
224+ let rAssetId = $t077557851._3
225+ let newBalanceA = $t077557851._4
226+ let newBalanceB = $t077557851._5
231227 if ((minReceive > rAmount))
232228 then throw(((("Calculated amount to receive is less than specified minimum " + toString(rAmount)) + " ") + toString(minReceive)))
233229 else {
252248 else false)
253249 then throw("Only eth and dyzrupt are supporting")
254250 else {
255- let $t094259520 = getEthDyzAmount(assetId, amount)
256- let feeAmount = $t094259520._1
257- let rAmount = $t094259520._2
258- let rAssetId = $t094259520._3
259- let newBalanceA = $t094259520._4
260- let newBalanceB = $t094259520._5
251+ let $t089649059 = getEthDyzAmount(assetId, amount)
252+ let feeAmount = $t089649059._1
253+ let rAmount = $t089649059._2
254+ let rAssetId = $t089649059._3
255+ let newBalanceA = $t089649059._4
256+ let newBalanceB = $t089649059._5
261257 if ((minReceive > rAmount))
262258 then throw(((("Calculated amount to receive is less than specified minimum " + toString(rAmount)) + " ") + toString(minReceive)))
263259 else {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdnDyzABalanceKey = "usdn_dyz_a_asset_balance"
55
66 let usdnDyzBBalanceKey = "usdn_dyz_b_asset_balance"
77
88 let ethDyzABalanceKey = "eth_dyz_a_asset_balance"
99
1010 let ethDyzBBalanceKey = "eth_dyz_b_asset_balance"
1111
1212 let usdnDyzPairIsActiveKey = "usdn_dyz_is_active"
1313
1414 let ethDyzPairIsActiveKey = "eth_dyz_is_active"
1515
1616 let feeKey = "fee"
1717
1818 let totalFeeEthKey = "total_fee_eth"
1919
2020 let totalFeeUsdKey = "total_fee_usd"
2121
2222 let totalFeeDyzraptKey = "total_fee_dyzrapt"
2323
2424 let maxRatio = 1000
2525
2626 let dyzraptAssetId = base58'2TLkgUERqF1y21ShjiFVVTVYtP1BL8wvc6BGLZvt4fND'
2727
2828 let ethAssetId = base58'795LiREqoqp73w5cMC8Azmk6YsWfgmMVTbFyfPGeSZxM'
2929
3030 let usdnAssetId = base58'G1rPVdqQWNC3883hjY4FkMdB8nMon7MRVruAgqdPNRr6'
3131
3232 let adminPublicKey = base58'528nVHsp2L7X5ZqAFk66cmMXLb1C9cB7iRky8KJc7SPt'
3333
3434 let feeAddress = Address(base58'3Mwosu69eyDx1sKv6wwJXNwVufpj7Pcmrz9')
3535
3636 func getIntKeyDataOrError (key) = {
3737 let v = valueOrErrorMessage(getInteger(this, key), "unable to read key")
3838 v
3939 }
4040
4141
4242 func getIntKeyData (key) = {
4343 let v = valueOrElse(getInteger(this, key), 0)
4444 v
4545 }
4646
4747
4848 func getTotalFeeByKey (key) = getIntKeyData(key)
4949
5050
5151 func getFeeAmount (amount) = {
5252 let fee = getIntKeyDataOrError(feeKey)
5353 let feeAmount = fraction(amount, fee, 10000)
5454 feeAmount
5555 }
5656
5757
5858 func getFeeKeyByAssetId (assetId) = if ((assetId == usdnAssetId))
5959 then totalFeeUsdKey
6060 else if ((assetId == ethAssetId))
6161 then totalFeeEthKey
6262 else if ((assetId == dyzraptAssetId))
6363 then totalFeeDyzraptKey
6464 else throw("Incorrect asset attached")
6565
6666
6767 func getUsdnDyzAmount (assetId,amount) = {
6868 let feeAmount = getFeeAmount(amount)
6969 let amountWithoutFee = (amount - feeAmount)
7070 let balanceA = getIntegerValue(this, usdnDyzABalanceKey)
7171 let balanceB = getIntegerValue(this, usdnDyzBBalanceKey)
7272 if ((assetId == usdnAssetId))
7373 then {
7474 let rAmount = fraction(balanceB, amountWithoutFee, (amountWithoutFee + balanceA))
7575 let rAssetId = dyzraptAssetId
7676 let newBalanceA = (amountWithoutFee + balanceA)
7777 let newBalanceB = (balanceB - rAmount)
7878 $Tuple5(feeAmount, rAmount, rAssetId, newBalanceA, newBalanceB)
7979 }
8080 else if ((assetId == dyzraptAssetId))
8181 then {
8282 let rAmount = fraction(balanceA, amountWithoutFee, (amountWithoutFee + balanceB))
8383 let rAssetId = usdnAssetId
8484 let newBalanceA = (balanceA - rAmount)
8585 let newBalanceB = (balanceB + amountWithoutFee)
8686 $Tuple5(feeAmount, rAmount, rAssetId, newBalanceA, newBalanceB)
8787 }
8888 else throw("Incorrect asset attached")
8989 }
9090
9191
9292 func getEthDyzAmount (assetId,amount) = {
9393 let feeAmount = getFeeAmount(amount)
9494 let amountWithoutFee = (amount - feeAmount)
9595 let balanceA = getIntegerValue(this, ethDyzABalanceKey)
9696 let balanceB = getIntegerValue(this, ethDyzBBalanceKey)
9797 if ((assetId == ethAssetId))
9898 then {
9999 let rAmount = fraction(balanceB, amountWithoutFee, (amountWithoutFee + balanceA))
100100 let rAssetId = dyzraptAssetId
101101 let newBalanceA = (amountWithoutFee + balanceA)
102102 let newBalanceB = (balanceB - rAmount)
103103 $Tuple5(feeAmount, rAmount, rAssetId, newBalanceA, newBalanceB)
104104 }
105105 else if ((assetId == dyzraptAssetId))
106106 then {
107107 let rAmount = fraction(balanceA, amountWithoutFee, (amountWithoutFee + balanceB))
108108 let rAssetId = ethAssetId
109109 let newBalanceA = (balanceA - rAmount)
110110 let newBalanceB = (balanceB + amountWithoutFee)
111111 $Tuple5(feeAmount, rAmount, rAssetId, newBalanceA, newBalanceB)
112112 }
113113 else throw("Incorrect asset attached")
114114 }
115115
116116
117117 @Callable(i)
118118 func initUsdnDyzPair () = if (isDefined(getBoolean(this, usdnDyzPairIsActiveKey)))
119119 then throw("Pair is already active")
120120 else if ((i.callerPublicKey != adminPublicKey))
121121 then throw("Only admin can activate pair")
122122 else {
123- let $t040204097 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
124- let pmtAmountA = $t040204097._1
125- let pmtAssetIdA = $t040204097._2
126- let $t041064183 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
127- let pmtAmountB = $t041064183._1
128- let pmtAssetIdB = $t041064183._2
123+ let $t039674044 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
124+ let pmtAmountA = $t039674044._1
125+ let pmtAssetIdA = $t039674044._2
126+ let $t040534130 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
127+ let pmtAmountB = $t040534130._1
128+ let pmtAssetIdB = $t040534130._2
129129 if ((pmtAssetIdA != usdnAssetId))
130130 then throw("A asset is not a usdn")
131131 else if ((pmtAssetIdB != dyzraptAssetId))
132132 then throw("B asset is not a dyzrupt")
133133 else [BooleanEntry(usdnDyzPairIsActiveKey, true), IntegerEntry(usdnDyzABalanceKey, pmtAmountA), IntegerEntry(usdnDyzBBalanceKey, pmtAmountB), IntegerEntry(feeKey, 300)]
134134 }
135135
136136
137137
138138 @Callable(i)
139139 func initEthDyzPair () = if (isDefined(getBoolean(this, ethDyzPairIsActiveKey)))
140140 then throw("Pair is already active")
141141 else if ((i.callerPublicKey != adminPublicKey))
142142 then throw("Only admin can activate pair")
143143 else {
144- let $t049164993 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
145- let pmtAmountA = $t049164993._1
146- let pmtAssetIdA = $t049164993._2
147- let $t050025079 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
148- let pmtAmountB = $t050025079._1
149- let pmtAssetIdB = $t050025079._2
144+ let $t048634940 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
145+ let pmtAmountA = $t048634940._1
146+ let pmtAssetIdA = $t048634940._2
147+ let $t049495026 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
148+ let pmtAmountB = $t049495026._1
149+ let pmtAssetIdB = $t049495026._2
150150 if ((pmtAssetIdA != ethAssetId))
151151 then throw("A asset is not a eth")
152152 else if ((pmtAssetIdB != dyzraptAssetId))
153153 then throw("B asset is not a dyzrupt")
154154 else [BooleanEntry(ethDyzPairIsActiveKey, true), IntegerEntry(ethDyzABalanceKey, pmtAmountA), IntegerEntry(ethDyzBBalanceKey, pmtAmountB), IntegerEntry(feeKey, 300)]
155155 }
156156
157157
158158
159159 @Callable(i)
160160 func addLiquidToUsdnDyz () = if (!(isDefined(getBoolean(this, usdnDyzPairIsActiveKey))))
161161 then throw("Pair is not active")
162162 else if ((i.callerPublicKey != adminPublicKey))
163163 then throw("Only admin can add liquid")
164164 else {
165- let $t058065883 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166- let pmtAmountA = $t058065883._1
167- let pmtAssetIdA = $t058065883._2
168- let $t058925969 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
169- let pmtAmountB = $t058925969._1
170- let pmtAssetIdB = $t058925969._2
165+ let $t057535830 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166+ let pmtAmountA = $t057535830._1
167+ let pmtAssetIdA = $t057535830._2
168+ let $t058395916 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
169+ let pmtAmountB = $t058395916._1
170+ let pmtAssetIdB = $t058395916._2
171171 if ((pmtAssetIdA != usdnAssetId))
172172 then throw("A asset is not a usdn")
173173 else if ((pmtAssetIdB != dyzraptAssetId))
174174 then throw("B asset is not a dyzrupt")
175175 else {
176176 let balanceA = getIntKeyData(usdnDyzABalanceKey)
177177 let balanceB = getIntKeyData(usdnDyzBBalanceKey)
178- let tokenRatio = fraction(fraction(balanceA, 100000000, pmtAmountA), 1000, fraction(balanceB, 100000000, pmtAmountB))
179- throw(("Incorrect assets amount: amounts must have the contract ratio " + toString(tokenRatio)))
178+[IntegerEntry(usdnDyzABalanceKey, (balanceA + pmtAmountA)), IntegerEntry(usdnDyzBBalanceKey, (balanceB + pmtAmountB))]
180179 }
181180 }
182181
183182
184183
185184 @Callable(i)
186185 func addLiquidToEthDyz () = if (!(isDefined(getBoolean(this, ethDyzPairIsActiveKey))))
187186 then throw("Pair is not active")
188187 else if ((i.callerPublicKey != adminPublicKey))
189188 then throw("Only admin can add liquid")
190189 else {
191- let $t068216898 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
192- let pmtAmountA = $t068216898._1
193- let pmtAssetIdA = $t068216898._2
194- let $t069076984 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
195- let pmtAmountB = $t069076984._1
196- let pmtAssetIdB = $t069076984._2
190+ let $t066736750 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
191+ let pmtAmountA = $t066736750._1
192+ let pmtAssetIdA = $t066736750._2
193+ let $t067596836 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
194+ let pmtAmountB = $t067596836._1
195+ let pmtAssetIdB = $t067596836._2
197196 if ((pmtAssetIdA != ethAssetId))
198197 then throw("A asset is not a eth")
199198 else if ((pmtAssetIdB != dyzraptAssetId))
200199 then throw("B asset is not a dyzrupt")
201200 else {
202201 let balanceA = getIntKeyData(ethDyzABalanceKey)
203202 let balanceB = getIntKeyData(ethDyzBBalanceKey)
204- let tokenRatio = fraction(fraction(balanceA, 100000000, pmtAmountA), 1000, fraction(balanceB, 100000000, pmtAmountB))
205- if ((tokenRatio > maxRatio))
206- then throw("Incorrect assets amount: amounts must have the contract ratio")
207- else [IntegerEntry(ethDyzABalanceKey, (balanceA + pmtAmountA)), IntegerEntry(ethDyzBBalanceKey, (balanceB + pmtAmountB))]
203+[IntegerEntry(ethDyzABalanceKey, (balanceA + pmtAmountA)), IntegerEntry(ethDyzBBalanceKey, (balanceB + pmtAmountB))]
208204 }
209205 }
210206
211207
212208
213209 @Callable(i)
214210 func exchangeUsdnDyz (minReceive) = if (!(isDefined(getBoolean(this, usdnDyzPairIsActiveKey))))
215211 then throw("Pair is not active")
216212 else {
217213 let pmt = value(i.payments[0])
218214 let assetId = pmt.assetId
219215 let amount = pmt.amount
220216 if (if ((assetId != usdnAssetId))
221217 then (assetId != dyzraptAssetId)
222218 else false)
223219 then throw("Only usdn and dyzrupt are supporting")
224220 else {
225- let $t082168312 = getUsdnDyzAmount(assetId, amount)
226- let feeAmount = $t082168312._1
227- let rAmount = $t082168312._2
228- let rAssetId = $t082168312._3
229- let newBalanceA = $t082168312._4
230- let newBalanceB = $t082168312._5
221+ let $t077557851 = getUsdnDyzAmount(assetId, amount)
222+ let feeAmount = $t077557851._1
223+ let rAmount = $t077557851._2
224+ let rAssetId = $t077557851._3
225+ let newBalanceA = $t077557851._4
226+ let newBalanceB = $t077557851._5
231227 if ((minReceive > rAmount))
232228 then throw(((("Calculated amount to receive is less than specified minimum " + toString(rAmount)) + " ") + toString(minReceive)))
233229 else {
234230 let totalFeeKey = getFeeKeyByAssetId(assetId)
235231 let totalFee = (getTotalFeeByKey(totalFeeKey) + feeAmount)
236232 [IntegerEntry(usdnDyzABalanceKey, newBalanceA), IntegerEntry(usdnDyzBBalanceKey, newBalanceB), IntegerEntry(totalFeeKey, totalFee), ScriptTransfer(feeAddress, feeAmount, assetId), ScriptTransfer(i.caller, rAmount, rAssetId)]
237233 }
238234 }
239235 }
240236
241237
242238
243239 @Callable(i)
244240 func exchangeEthDyz (minReceive) = if (!(isDefined(getBoolean(this, ethDyzPairIsActiveKey))))
245241 then throw("Pair is not active")
246242 else {
247243 let pmt = value(i.payments[0])
248244 let assetId = pmt.assetId
249245 let amount = pmt.amount
250246 if (if ((assetId != ethAssetId))
251247 then (assetId != dyzraptAssetId)
252248 else false)
253249 then throw("Only eth and dyzrupt are supporting")
254250 else {
255- let $t094259520 = getEthDyzAmount(assetId, amount)
256- let feeAmount = $t094259520._1
257- let rAmount = $t094259520._2
258- let rAssetId = $t094259520._3
259- let newBalanceA = $t094259520._4
260- let newBalanceB = $t094259520._5
251+ let $t089649059 = getEthDyzAmount(assetId, amount)
252+ let feeAmount = $t089649059._1
253+ let rAmount = $t089649059._2
254+ let rAssetId = $t089649059._3
255+ let newBalanceA = $t089649059._4
256+ let newBalanceB = $t089649059._5
261257 if ((minReceive > rAmount))
262258 then throw(((("Calculated amount to receive is less than specified minimum " + toString(rAmount)) + " ") + toString(minReceive)))
263259 else {
264260 let totalFeeKey = getFeeKeyByAssetId(assetId)
265261 let totalFee = (getTotalFeeByKey(totalFeeKey) + feeAmount)
266262 [IntegerEntry(ethDyzABalanceKey, newBalanceA), IntegerEntry(ethDyzBBalanceKey, newBalanceB), IntegerEntry(totalFeeKey, totalFee), ScriptTransfer(feeAddress, feeAmount, assetId), ScriptTransfer(i.caller, rAmount, rAssetId)]
267263 }
268264 }
269265 }
270266
271267

github/deemru/w8io/169f3d6 
172.76 ms