tx · FY5V8rz5rLaMr94r5G68yKVrdwpwiE5sYjHMP9c1Jf6W

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.09.09 23:56 [1696020] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "FY5V8rz5rLaMr94r5G68yKVrdwpwiE5sYjHMP9c1Jf6W", "fee": 1000000, "feeAssetId": null, "timestamp": 1631220990606, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "WVRh5hdzV9joAsV132Zy2uVNN4kRi8BruYtvrckFcvcrpqrJC67xoyABWgGJLYesUTn8PnoRo3CDitkovTcjwpH" ], "script": "base64:AAIFAAAAAAAAA+EIAhIICgYYGBEYAgEaFQoCYTESD2NoZWNrUG9zc2liaWx0eRoPCgJhMhIJcG10QW1vdW50GhgKAmEzEhJtaW5BbW91bnRUb1JlY2VpdmUaEAoCYTQSCmV4Y2hhbmdlcnMaFAoCYTUSDmV4Y2hhbmdlcnNUeXBlGhcKAmE2EhFyb3V0aW5nQXNzZXRzS2V5cxoQCgJhNxIKY29tbWlzc2lvbhoeCgJhOBIYY29tbWlzc2lvblNjYWxlRGVsaW1pdGVyGhMKAmE5Eg1kQXBwMVRva2VuUGF5GhMKAmIxEg1kQXBwMVRva2VuR2V0GhMKAmIyEg1kQXBwMlRva2VuUGF5GhMKAmIzEg1kQXBwMlRva2VuR2V0GhMKAmI0Eg1nZXRGcm9tMVRyYWRlGhoKAmI1EhRnZXRGcm9tMVRyYWRlV2l0aEZlZRoTCgJiNhINZ2V0RnJvbTJUcmFkZRoaCgJiNxIUZ2V0RnJvbTJUcmFkZVdpdGhGZWUaBwoCYjgSAWkaCgoCYjkSBGFyZ3MaFAoCYzESDnJlY2VpdmVBc3NldElkGhEKAm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QABkQAAAAIFAAAAAmU1AAAAAAAAAAACAwkAAAAAAAACBQAAAAJlNgAAAAAAAAAAAwUAAAACZjEEAAAAAmYyCQEAAAACYzUAAAACBQAAAAJmMQkAAZEAAAACBQAAAAJlNQAAAAAAAAAAAwkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDMEAAAAAmM5CAUAAAACZTQAAAACXzEEAAAAAmQxCAUAAAACZTQAAAACXzIEAAAAAmQyCAUAAAACZTQAAAACXzMEAAAAAmYzCQAD8AAAAAIFAAAABHRoaXMFAAAAAmMxAwMJAAAAAAAAAgUAAAACYzkFAAAAAmM0CQAAZwAAAAIFAAAAAmYzBQAAAAJhMwcJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAmI4AAAABmNhbGxlcgUAAAACZjMFAAAAAmMxBQAAAANuaWwJAAACAAAAAQIAAAA+cm91dGluZyAhPSByb3V0aW5nU2l6ZSBvciBhbW91bnRUb1JlY2lldmUgPCBtaW5BbW91bnRUb1JlY2VpdmUAAAAAO/ywIQ==", "height": 1696020, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8vLJDmwemBYi1bSduvX2PWf37yBFJShX9PyPb3tSvbar Next: CdZYon4JJbf1r9uhhso9PRSwSiUCNPGZ4aFQtib4u91i Diff:
OldNewDifferences
1212 let getFrom1TradeWithFee = fraction(getFrom1Trade, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
1313 let getFrom2Trade = fraction(dApp2TokenGet, getFrom1TradeWithFee, (getFrom1TradeWithFee + dApp2TokenPay))
1414 let getFrom2TradeWithFee = fraction(getFrom2Trade, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
15- if (true)
16- then throw(toString(getFrom1TradeWithFee))
17- else if ((getFrom2TradeWithFee >= minAmountToReceive))
18- then true
19- else false
15+ if ((getFrom2TradeWithFee >= minAmountToReceive))
16+ then true
17+ else false
2018 }
2119
2220
2321 @Callable(i)
2422 func routingTrade (exchangers,exchangersType,args,routingAssetsKeys,receiveAssetId,minAmountToReceive) = {
25- let $t020252099 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
26- let pmtAmount = $t020252099._1
27- let pmtAssetId = $t020252099._2
23+ let $t019642038 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
24+ let pmtAmount = $t019642038._1
25+ let pmtAssetId = $t019642038._2
2826 if (!(checkPossibilty(pmtAmount, minAmountToReceive, exchangers, exchangersType, routingAssetsKeys)))
2927 then throw("Check transaction possibilty: declined")
3028 else {
3129 let routingSize = size(exchangers)
3230 func exchangeFold (accumulated,exchanger) = {
33- let $t023892452 = accumulated
34- let exchangeCounter = $t023892452._1
35- let amountsWithFee = $t023892452._2
36- let assetsIdSend = $t023892452._3
31+ let $t023282391 = accumulated
32+ let exchangeCounter = $t023282391._1
33+ let amountsWithFee = $t023282391._2
34+ let assetsIdSend = $t023282391._3
3735 if ((exchangeCounter == 0))
3836 then {
3937 let exchangerAddress = addressFromStringValue(exchanger)
4139 if ((inv == inv))
4240 then match inv {
4341 case inv: (Int, ByteVector) =>
44- let $t027872825 = inv
45- let amountWithFee = $t027872825._1
46- let assetIdSend = $t027872825._2
42+ let $t027262764 = inv
43+ let amountWithFee = $t027262764._1
44+ let assetIdSend = $t027262764._2
4745 $Tuple3((exchangeCounter + 1), amountWithFee, assetIdSend)
4846 case _ =>
4947 throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
5553 else false)
5654 then {
5755 let exchangerAddress = addressFromStringValue(exchanger)
58- let $t031713237 = $Tuple2(assetsIdSend, amountsWithFee)
59- let pmtAssetIdRout = $t031713237._1
60- let pmtAmountRout = $t031713237._2
56+ let $t031103176 = $Tuple2(assetsIdSend, amountsWithFee)
57+ let pmtAssetIdRout = $t031103176._1
58+ let pmtAmountRout = $t031103176._2
6159 let inv = invoke(exchangerAddress, "exchange", [args[exchangeCounter]], [AttachedPayment(pmtAssetIdRout, pmtAmountRout)])
6260 if ((inv == inv))
6361 then match inv {
6462 case inv: (Int, ByteVector) =>
65- let $t034863524 = inv
66- let amountWithFee = $t034863524._1
67- let assetIdSend = $t034863524._2
63+ let $t034253463 = inv
64+ let amountWithFee = $t034253463._1
65+ let assetIdSend = $t034253463._2
6866 $Tuple3((exchangeCounter + 1), amountWithFee, assetIdSend)
6967 case _ =>
7068 throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
7472 else accumulated
7573 }
7674
77- let $t037623863 = {
78- let $list38143863 = exchangers
79- let $size38143863 = size($list38143863)
80- let $acc038143863 = $Tuple3(0, 0, base58'')
81- if (($size38143863 == 0))
82- then $acc038143863
75+ let $t037013802 = {
76+ let $list37533802 = exchangers
77+ let $size37533802 = size($list37533802)
78+ let $acc037533802 = $Tuple3(0, 0, base58'')
79+ if (($size37533802 == 0))
80+ then $acc037533802
8381 else {
84- let $acc138143863 = exchangeFold($acc038143863, $list38143863[0])
85- if (($size38143863 == 1))
86- then $acc138143863
82+ let $acc137533802 = exchangeFold($acc037533802, $list37533802[0])
83+ if (($size37533802 == 1))
84+ then $acc137533802
8785 else {
88- let $acc238143863 = exchangeFold($acc138143863, $list38143863[1])
89- if (($size38143863 == 2))
90- then $acc238143863
86+ let $acc237533802 = exchangeFold($acc137533802, $list37533802[1])
87+ if (($size37533802 == 2))
88+ then $acc237533802
9189 else {
92- let $acc338143863 = exchangeFold($acc238143863, $list38143863[2])
93- if (($size38143863 == 3))
94- then $acc338143863
90+ let $acc337533802 = exchangeFold($acc237533802, $list37533802[2])
91+ if (($size37533802 == 3))
92+ then $acc337533802
9593 else {
96- let $acc438143863 = exchangeFold($acc338143863, $list38143863[3])
94+ let $acc437533802 = exchangeFold($acc337533802, $list37533802[3])
9795 throw("List size exceed 3")
9896 }
9997 }
10098 }
10199 }
102100 }
103- let exchangeCounter = $t037623863._1
104- let amountsWithFee = $t037623863._2
105- let assetsIdSend = $t037623863._3
101+ let exchangeCounter = $t037013802._1
102+ let amountsWithFee = $t037013802._2
103+ let assetsIdSend = $t037013802._3
106104 let amountToRecieve = assetBalance(this, receiveAssetId)
107105 if (if ((exchangeCounter == routingSize))
108106 then (amountToRecieve >= minAmountToReceive)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func checkPossibilty (pmtAmount,minAmountToReceive,exchangers,exchangersType,routingAssetsKeys) = {
55 let commission = 3000
66 let commissionScaleDelimiter = 1000000
77 let dApp1TokenPay = getIntegerValue(addressFromStringValue(exchangers[0]), routingAssetsKeys[0])
88 let dApp1TokenGet = getIntegerValue(addressFromStringValue(exchangers[0]), routingAssetsKeys[1])
99 let dApp2TokenPay = getIntegerValue(addressFromStringValue(exchangers[1]), routingAssetsKeys[2])
1010 let dApp2TokenGet = getIntegerValue(addressFromStringValue(exchangers[1]), routingAssetsKeys[3])
1111 let getFrom1Trade = fraction(dApp1TokenGet, pmtAmount, (pmtAmount + dApp1TokenPay))
1212 let getFrom1TradeWithFee = fraction(getFrom1Trade, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
1313 let getFrom2Trade = fraction(dApp2TokenGet, getFrom1TradeWithFee, (getFrom1TradeWithFee + dApp2TokenPay))
1414 let getFrom2TradeWithFee = fraction(getFrom2Trade, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
15- if (true)
16- then throw(toString(getFrom1TradeWithFee))
17- else if ((getFrom2TradeWithFee >= minAmountToReceive))
18- then true
19- else false
15+ if ((getFrom2TradeWithFee >= minAmountToReceive))
16+ then true
17+ else false
2018 }
2119
2220
2321 @Callable(i)
2422 func routingTrade (exchangers,exchangersType,args,routingAssetsKeys,receiveAssetId,minAmountToReceive) = {
25- let $t020252099 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
26- let pmtAmount = $t020252099._1
27- let pmtAssetId = $t020252099._2
23+ let $t019642038 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
24+ let pmtAmount = $t019642038._1
25+ let pmtAssetId = $t019642038._2
2826 if (!(checkPossibilty(pmtAmount, minAmountToReceive, exchangers, exchangersType, routingAssetsKeys)))
2927 then throw("Check transaction possibilty: declined")
3028 else {
3129 let routingSize = size(exchangers)
3230 func exchangeFold (accumulated,exchanger) = {
33- let $t023892452 = accumulated
34- let exchangeCounter = $t023892452._1
35- let amountsWithFee = $t023892452._2
36- let assetsIdSend = $t023892452._3
31+ let $t023282391 = accumulated
32+ let exchangeCounter = $t023282391._1
33+ let amountsWithFee = $t023282391._2
34+ let assetsIdSend = $t023282391._3
3735 if ((exchangeCounter == 0))
3836 then {
3937 let exchangerAddress = addressFromStringValue(exchanger)
4038 let inv = invoke(exchangerAddress, "exchange", [args[exchangeCounter]], [AttachedPayment(pmtAssetId, pmtAmount)])
4139 if ((inv == inv))
4240 then match inv {
4341 case inv: (Int, ByteVector) =>
44- let $t027872825 = inv
45- let amountWithFee = $t027872825._1
46- let assetIdSend = $t027872825._2
42+ let $t027262764 = inv
43+ let amountWithFee = $t027262764._1
44+ let assetIdSend = $t027262764._2
4745 $Tuple3((exchangeCounter + 1), amountWithFee, assetIdSend)
4846 case _ =>
4947 throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
5048 }
5149 else throw("Strict value is not equal to itself.")
5250 }
5351 else if (if ((exchangeCounter > 0))
5452 then (routingSize > exchangeCounter)
5553 else false)
5654 then {
5755 let exchangerAddress = addressFromStringValue(exchanger)
58- let $t031713237 = $Tuple2(assetsIdSend, amountsWithFee)
59- let pmtAssetIdRout = $t031713237._1
60- let pmtAmountRout = $t031713237._2
56+ let $t031103176 = $Tuple2(assetsIdSend, amountsWithFee)
57+ let pmtAssetIdRout = $t031103176._1
58+ let pmtAmountRout = $t031103176._2
6159 let inv = invoke(exchangerAddress, "exchange", [args[exchangeCounter]], [AttachedPayment(pmtAssetIdRout, pmtAmountRout)])
6260 if ((inv == inv))
6361 then match inv {
6462 case inv: (Int, ByteVector) =>
65- let $t034863524 = inv
66- let amountWithFee = $t034863524._1
67- let assetIdSend = $t034863524._2
63+ let $t034253463 = inv
64+ let amountWithFee = $t034253463._1
65+ let assetIdSend = $t034253463._2
6866 $Tuple3((exchangeCounter + 1), amountWithFee, assetIdSend)
6967 case _ =>
7068 throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
7169 }
7270 else throw("Strict value is not equal to itself.")
7371 }
7472 else accumulated
7573 }
7674
77- let $t037623863 = {
78- let $list38143863 = exchangers
79- let $size38143863 = size($list38143863)
80- let $acc038143863 = $Tuple3(0, 0, base58'')
81- if (($size38143863 == 0))
82- then $acc038143863
75+ let $t037013802 = {
76+ let $list37533802 = exchangers
77+ let $size37533802 = size($list37533802)
78+ let $acc037533802 = $Tuple3(0, 0, base58'')
79+ if (($size37533802 == 0))
80+ then $acc037533802
8381 else {
84- let $acc138143863 = exchangeFold($acc038143863, $list38143863[0])
85- if (($size38143863 == 1))
86- then $acc138143863
82+ let $acc137533802 = exchangeFold($acc037533802, $list37533802[0])
83+ if (($size37533802 == 1))
84+ then $acc137533802
8785 else {
88- let $acc238143863 = exchangeFold($acc138143863, $list38143863[1])
89- if (($size38143863 == 2))
90- then $acc238143863
86+ let $acc237533802 = exchangeFold($acc137533802, $list37533802[1])
87+ if (($size37533802 == 2))
88+ then $acc237533802
9189 else {
92- let $acc338143863 = exchangeFold($acc238143863, $list38143863[2])
93- if (($size38143863 == 3))
94- then $acc338143863
90+ let $acc337533802 = exchangeFold($acc237533802, $list37533802[2])
91+ if (($size37533802 == 3))
92+ then $acc337533802
9593 else {
96- let $acc438143863 = exchangeFold($acc338143863, $list38143863[3])
94+ let $acc437533802 = exchangeFold($acc337533802, $list37533802[3])
9795 throw("List size exceed 3")
9896 }
9997 }
10098 }
10199 }
102100 }
103- let exchangeCounter = $t037623863._1
104- let amountsWithFee = $t037623863._2
105- let assetsIdSend = $t037623863._3
101+ let exchangeCounter = $t037013802._1
102+ let amountsWithFee = $t037013802._2
103+ let assetsIdSend = $t037013802._3
106104 let amountToRecieve = assetBalance(this, receiveAssetId)
107105 if (if ((exchangeCounter == routingSize))
108106 then (amountToRecieve >= minAmountToReceive)
109107 else false)
110108 then [ScriptTransfer(i.caller, amountToRecieve, receiveAssetId)]
111109 else throw("routing != routingSize or amountToRecieve < minAmountToReceive")
112110 }
113111 }
114112
115113

github/deemru/w8io/026f985 
46.64 ms