tx · KcDP7dECm24742GLrcxsJrfdci3sMYsEYeBj6PpJPpj

3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9:  -0.01000000 Waves

2023.10.06 11:15 [2786512] smart account 3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9 > SELF 0.00000000 Waves

{ "type": 13, "id": "KcDP7dECm24742GLrcxsJrfdci3sMYsEYeBj6PpJPpj", "fee": 1000000, "feeAssetId": null, "timestamp": 1696580124023, "version": 2, "chainId": 84, "sender": "3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9", "senderPublicKey": "4AVkL2DQJ8sngCNyArYueNuPS7cvygnakPJhU65LfPfu", "proofs": [ "kQTGmFDHr853SVKjCBPj3D4sQ7DJq7323fvunTKQzXTYwqWkzdvGAbfwegXG1vHkSWoRnBibvvBYLFVd8VWSAUh", "5tQk3ntvsPjKSkbDw4SNoAf8NUP1SQticPVmBU5Mu6HHW1z6FmFFaTtbFHJJwEnb6t9KNjUakhqezTJGW3St5wxH" ], "script": "base64:BgIMCAISAwoBGBIDCgEYEQAOQVhMWV9NQUlOX0FERFIJAQdBZGRyZXNzAQEaAVRHYdFKTc5/+9vupfS91sItmkjqQtK5YZsAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAKa1NoYXJlUG9vbAIMX3Bvb2xTaGFyZUlkAAVrUG9vbAIFcG9vbF8ACWtBZG1pbjFQSwIVZ3JvdXAxX2FkbWluMV9wdWJfa2V5AAlrQWRtaW4yUEsCFWdyb3VwMV9hZG1pbjJfcHViX2tleQAJa0FkbWluM1BLAhVncm91cDFfYWRtaW4zX3B1Yl9rZXkAD2tPcGVyYXRvckNhbGxQSwISYWRtaW5fY2FsbF9wdWJfa2V5AAhhZG1pbjFQSwkA2QQBCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUOQVhMWV9NQUlOX0FERFIFCWtBZG1pbjFQSwISQ2FuJ3QgZ2V0IGFkbWluMVBLAAhhZG1pbjJQSwkA2Q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AAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCGFkbWluMlBLAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUIYWRtaW4zUEsAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAITLenR", "height": 2786512, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4K7aLKSLrQb8TF4gsC9xk2YQ1Qz3pmnA4W6bPaPejAej Next: C4XZSBFndDbybXHs9EzPDfkXAvhrG7sWnKHANTw58CxQ Diff:
OldNewDifferences
166166
167167 $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($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)
168168 }
169- nil
169+ if ((res == res))
170+ then nil
171+ else throw("Strict value is not equal to itself.")
170172 }
171173
172174
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let AXLY_MAIN_ADDR = Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS')
55
66 let SF_POOL = "SF"
77
88 let WX_POOL = "WX"
99
1010 let kSharePool = "_poolShareId"
1111
1212 let kPool = "pool_"
1313
1414 let kAdmin1PK = "group1_admin1_pub_key"
1515
1616 let kAdmin2PK = "group1_admin2_pub_key"
1717
1818 let kAdmin3PK = "group1_admin3_pub_key"
1919
2020 let kOperatorCallPK = "admin_call_pub_key"
2121
2222 let admin1PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin1PK), "Can't get admin1PK"))
2323
2424 let admin2PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin2PK), "Can't get admin2PK"))
2525
2626 let admin3PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin3PK), "Can't get admin3PK"))
2727
2828 let operatorPK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kOperatorCallPK), "Can't get operatorPK"))
2929
3030 func unknownPoolType () = throw("Wrong pool type")
3131
3232
3333 func listToInt (a,item) = (a :+ parseIntValue(item))
3434
3535
3636 func directSwopfiCPMM (rArgs) = {
3737 let dApp = addressFromStringValue(rArgs[1])
3838 let pmt = {
3939 let pmtP = split(rArgs[2], "|")
4040 [AttachedPayment(fromBase58String(pmtP[0]), parseIntValue(pmtP[1]))]
4141 }
4242 let minToRecive = rArgs[3]
4343 invoke(dApp, "callFunction", ["exchange", [minToRecive]], pmt)
4444 }
4545
4646
4747 func directRoutingSwopfi (rArgs) = {
4848 let dApp = addressFromStringValue(rArgs[1])
4949 let pmt = {
5050 let pmtP = split(rArgs[2], "|")
5151 [AttachedPayment(fromBase58String(pmtP[0]), parseIntValue(pmtP[1]))]
5252 }
5353 let args = {
5454 let eArgs = split(rArgs[3], "|")
5555 let exchangers = split(eArgs[0], ",")
5656 let exchangersType = split(eArgs[1], ",")
5757 let args1 = {
5858 let $l = split(eArgs[2], ",")
5959 let $s = size($l)
6060 let $acc0 = nil
6161 func $f0_1 ($a,$i) = if (($i >= $s))
6262 then $a
6363 else listToInt($a, $l[$i])
6464
6565 func $f0_2 ($a,$i) = if (($i >= $s))
6666 then $a
6767 else throw("List size exceeds 3")
6868
6969 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
7070 }
7171 let args2 = {
7272 let $l = split(eArgs[3], ",")
7373 let $s = size($l)
7474 let $acc0 = nil
7575 func $f1_1 ($a,$i) = if (($i >= $s))
7676 then $a
7777 else listToInt($a, $l[$i])
7878
7979 func $f1_2 ($a,$i) = if (($i >= $s))
8080 then $a
8181 else throw("List size exceeds 3")
8282
8383 $f1_2($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3)
8484 }
8585 let routingAssetsKeys = split(eArgs[4], ",")
8686 let minToRecive = parseIntValue(eArgs[4])
8787 [exchangers, exchangersType, args1, args2, routingAssetsKeys, minToRecive]
8888 }
8989 invoke(dApp, "routingTrade", args, pmt)
9090 }
9191
9292
9393 @Callable(i)
9494 func exchangeLps (lps) = {
9595 func exLP (a,lp) = {
9696 let lpB = fromBase58String(lp)
9797 let balance = assetBalance(this, lpB)
9898 let pool = valueOrErrorMessage(getString(AXLY_MAIN_ADDR, (lp + kSharePool)), ("Can't get pool of lp:" + lp))
9999 let pType = valueOrErrorMessage(getString(AXLY_MAIN_ADDR, (kPool + pool)), "Pool is not inited")
100100 let poolAddr = valueOrErrorMessage(addressFromString(pool), "unknown addr")
101101 if ((balance > 0))
102102 then {
103103 let inv = if ((pType == SF_POOL))
104104 then invoke(poolAddr, "callFunction", ["withdraw", ["0"]], [AttachedPayment(lpB, balance)])
105105 else if ((pType == WX_POOL))
106106 then invoke(poolAddr, "get", nil, [AttachedPayment(lpB, balance)])
107107 else unknownPoolType()
108108 if ((inv == inv))
109109 then (a :+ true)
110110 else throw("Strict value is not equal to itself.")
111111 }
112112 else (a :+ false)
113113 }
114114
115115 let res = {
116116 let $l = lps
117117 let $s = size($l)
118118 let $acc0 = nil
119119 func $f0_1 ($a,$i) = if (($i >= $s))
120120 then $a
121121 else exLP($a, $l[$i])
122122
123123 func $f0_2 ($a,$i) = if (($i >= $s))
124124 then $a
125125 else throw("List size exceeds 50")
126126
127127 $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($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)
128128 }
129129 $Tuple2(nil, res)
130130 }
131131
132132
133133
134134 @Callable(i)
135135 func exchangeTokens (routes) = {
136136 func exchangeToken (r,route) = {
137137 let rArgs = split(route, "__")
138138 if ((rArgs[0] == "directSwopfiCPMM"))
139139 then {
140140 let inv = directSwopfiCPMM(rArgs)
141141 if ((inv == inv))
142142 then (r :+ inv)
143143 else throw("Strict value is not equal to itself.")
144144 }
145145 else if ((rArgs[0] == "routingSwopfi"))
146146 then {
147147 let inv = directRoutingSwopfi(rArgs)
148148 if ((inv == inv))
149149 then (r :+ inv)
150150 else throw("Strict value is not equal to itself.")
151151 }
152152 else throw("Unknown route type")
153153 }
154154
155155 let res = {
156156 let $l = routes
157157 let $s = size($l)
158158 let $acc0 = nil
159159 func $f0_1 ($a,$i) = if (($i >= $s))
160160 then $a
161161 else exchangeToken($a, $l[$i])
162162
163163 func $f0_2 ($a,$i) = if (($i >= $s))
164164 then $a
165165 else throw("List size exceeds 30")
166166
167167 $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($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)
168168 }
169- nil
169+ if ((res == res))
170+ then nil
171+ else throw("Strict value is not equal to itself.")
170172 }
171173
172174
173175 @Verifier(tx)
174176 func verify () = match tx {
175177 case inv: InvokeScriptTransaction =>
176178 let isRightFee = if ((inv.fee == 900000))
177179 then (inv.feeAssetId == unit)
178180 else false
179181 let isExLpCall = (inv.function == "exchangeLps")
180182 let isExTokensCall = (inv.function == "exchangeTokens")
181183 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
182184 then 1
183185 else 0
184186 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin2PK))
185187 then 1
186188 else 0
187189 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin3PK))
188190 then 1
189191 else 0
190192 let adminPubKeyCallSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], operatorPK))
191193 then 1
192194 else 0
193195 let signedByOneAdmin = ((((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) + adminPubKeyCallSigned) >= 1)
194196 if (if (isRightFee)
195197 then if (isExLpCall)
196198 then true
197199 else isExTokensCall
198200 else false)
199201 then signedByOneAdmin
200202 else false
201203 case _ =>
202204 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
203205 then 1
204206 else 0
205207 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK))
206208 then 1
207209 else 0
208210 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK))
209211 then 1
210212 else 0
211213 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
212214 }
213215

github/deemru/w8io/026f985 
34.81 ms