tx · 9zRFFWnZ51s11ZtRWVmPWN18Udh9rugAGKuXxQv3uLs7

3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2:  -0.00300000 Waves

2023.04.26 00:04 [2550587] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves

{ "type": 13, "id": "9zRFFWnZ51s11ZtRWVmPWN18Udh9rugAGKuXxQv3uLs7", "fee": 300000, "feeAssetId": null, "timestamp": 1682456687764, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "i1881jAgKJ3rGzdtPPxAkHMdRVdfdF1nGdSWXyCQouDE9j1cDbEjBXb4Qy5exXxUqs3ga3HQnvALhuwBhV6w1FW" ], "script": "base64:BgIMCAISAwoBCBIDCgEIDgAKS19hbV9hc19pZAIPJXNfX2Ftb3VudEFzc2V0AApLX3ByX2FzX2lkAg4lc19fcHJpY2VBc3NldAAFS19hbXACByVzX19hbXAAB0tfc2hhcmUCRCVzJXNfX3NoYXJlQXNzZXRCYWxhbmNlX19ZaU5ib2ZGekMxN2pFSEhDTXdyUmNweTlNcnJqYWJNTUxaeGc4ZzV4bWY3AAhLX3N0YWtlZAIZJXMlc19fc3Rha2VkQmFsYW5jZV9XQVZFUwEMdHJ5R2V0U3RyaW5nAgNrZXkHYWRkcmVzcwQHJG1hdGNoMAkAnQgCBQdhZGRyZXNzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFiBQckbWF0Y2gwBQFiAgABDXRyeUdldEludGVnZXICA2tleQdhZGRyZXNzBAckbWF0Y2gwCQCaCAIFB2FkZHJlc3MFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEPZ2V0QXNzZXRCYWxhbmNlAgdhZGRyZXNzB2Fzc2V0SWQEAWEJAPAHAgUHYWRkcmV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ApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA7ADwAPQA+AD8AQABBAEIAQwBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQBAZyZXN1bHQJALsJAgUGcmVzQXJyAgF8CQACAQUGcmVzdWx0AWkBBHRlc3QBAXMJAAIBBQFzAODyKGM=", "height": 2550587, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2eJr9ENwuUSAUUJVoAWqTssr6Ex9Q9XNo73MtYSuuWMi Next: HzAbUAGVucHENJxUDCnDAn6kcDbGqZtrEtiRwgCXqH47 Diff:
OldNewDifferences
8989 }
9090
9191
92-func process (result,params) = {
93- let arr = split_4C(params, ";")
94- let $t022282285 = $Tuple3(arr[0], arr[1], arr[2])
95- let address = $t022282285._1
96- let type = $t022282285._2
97- let assetsStr = $t022282285._3
98- let assetsString = getBalancesStr(assetsStr, address)
99- let resItem = ((address + "/") + assetsString)
100-resItem :: result
101- }
102-
103-
104-func processNew (result,address) = {
105- let $t024902533 = getWxData(address)
106- let assetsStr = $t024902533._1
107- let datas = $t024902533._2
92+func processWX (result,address) = {
93+ let $t021942237 = getWxData(address)
94+ let assetsStr = $t021942237._1
95+ let datas = $t021942237._2
10896 let assetsString = getBalancesStr(assetsStr, address)
10997 let resItem = ((((address + "/") + assetsString) + "/") + datas)
11098 resItem :: result
120108 let $acc0 = nil
121109 func $f0_1 ($a,$i) = if (($i >= $s))
122110 then $a
123- else processNew($a, $l[$i])
111+ else processWX($a, $l[$i])
124112
125113 func $f0_2 ($a,$i) = if (($i >= $s))
126114 then $a
135123
136124
137125 @Callable(i)
138-func getWX (params) = {
139- let pools_params = split_4C(params, "|")
140- let resArr = {
141- let $l = pools_params
142- let $s = size($l)
143- let $acc0 = nil
144- func $f0_1 ($a,$i) = if (($i >= $s))
145- then $a
146- else process($a, $l[$i])
147-
148- func $f0_2 ($a,$i) = if (($i >= $s))
149- then $a
150- else throw("List size exceeds 80")
151-
152- $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($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), 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)
153- }
154- let result = makeString_2C(resArr, "|")
155- nil
156- }
157-
158-
159-
160-@Callable(i)
161126 func test (s) = throw(s)
162127
163128
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let K_am_as_id = "%s__amountAsset"
55
66 let K_pr_as_id = "%s__priceAsset"
77
88 let K_amp = "%s__amp"
99
1010 let K_share = "%s%s__shareAssetBalance__YiNbofFzC17jEHHCMwrRcpy9MrrjabMMLZxg8g5xmf7"
1111
1212 let K_staked = "%s%s__stakedBalance_WAVES"
1313
1414 func tryGetString (key,address) = match getString(address, key) {
1515 case b: String =>
1616 b
1717 case _ =>
1818 ""
1919 }
2020
2121
2222 func tryGetInteger (key,address) = match getInteger(address, key) {
2323 case b: Int =>
2424 b
2525 case _ =>
2626 0
2727 }
2828
2929
3030 func getAssetBalance (address,assetId) = {
3131 let a = assetBalance(address, assetId)
3232 a
3333 }
3434
3535
3636 func getWavesBalance (address) = {
3737 let w = wavesBalance(address).available
3838 w
3939 }
4040
4141
4242 func getBalance (result,assetId) = {
4343 let address = take(result, 35)
4444 let addr = Address(fromBase58String(address))
4545 let balance = if ((assetId == "WAVES"))
4646 then getWavesBalance(addr)
4747 else {
4848 let aId = fromBase58String(assetId)
4949 getAssetBalance(addr, aId)
5050 }
5151 let len = size(result)
5252 (((((address + drop(result, 35)) + assetId) + ":") + toString(balance)) + ",")
5353 }
5454
5555
5656 func getWxData (address) = {
5757 let addr = Address(fromBase58String(address))
5858 let amountId = tryGetString(K_am_as_id, addr)
5959 let priceId = tryGetString(K_pr_as_id, addr)
6060 let amp = tryGetInteger(K_amp, addr)
6161 let share = tryGetInteger(K_share, addr)
6262 let stake = tryGetInteger(K_staked, addr)
6363 $Tuple2(((amountId + ",") + priceId), ((((toString(amp) + ",") + toString(share)) + ",") + toString(stake)))
6464 }
6565
6666
6767 func test_loop (result,ele) = ele :: result
6868
6969
7070 func getBalancesStr (assetsStr,address) = {
7171 let assets = split_4C(assetsStr, ",")
7272 let res = {
7373 let $l = assets
7474 let $s = size($l)
7575 let $acc0 = address
7676 func $f0_1 ($a,$i) = if (($i >= $s))
7777 then $a
7878 else getBalance($a, $l[$i])
7979
8080 func $f0_2 ($a,$i) = if (($i >= $s))
8181 then $a
8282 else throw("List size exceeds 2")
8383
8484 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
8585 }
8686 let balances = drop(res, 35)
8787 let bals = dropRight(balances, 1)
8888 bals
8989 }
9090
9191
92-func process (result,params) = {
93- let arr = split_4C(params, ";")
94- let $t022282285 = $Tuple3(arr[0], arr[1], arr[2])
95- let address = $t022282285._1
96- let type = $t022282285._2
97- let assetsStr = $t022282285._3
98- let assetsString = getBalancesStr(assetsStr, address)
99- let resItem = ((address + "/") + assetsString)
100-resItem :: result
101- }
102-
103-
104-func processNew (result,address) = {
105- let $t024902533 = getWxData(address)
106- let assetsStr = $t024902533._1
107- let datas = $t024902533._2
92+func processWX (result,address) = {
93+ let $t021942237 = getWxData(address)
94+ let assetsStr = $t021942237._1
95+ let datas = $t021942237._2
10896 let assetsString = getBalancesStr(assetsStr, address)
10997 let resItem = ((((address + "/") + assetsString) + "/") + datas)
11098 resItem :: result
11199 }
112100
113101
114102 @Callable(i)
115103 func getWXNew (params) = {
116104 let pools = split_4C(params, ",")
117105 let resArr = {
118106 let $l = pools
119107 let $s = size($l)
120108 let $acc0 = nil
121109 func $f0_1 ($a,$i) = if (($i >= $s))
122110 then $a
123- else processNew($a, $l[$i])
111+ else processWX($a, $l[$i])
124112
125113 func $f0_2 ($a,$i) = if (($i >= $s))
126114 then $a
127115 else throw("List size exceeds 80")
128116
129117 $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($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), 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)
130118 }
131119 let result = makeString_11C(resArr, "|")
132120 throw(result)
133121 }
134122
135123
136124
137125 @Callable(i)
138-func getWX (params) = {
139- let pools_params = split_4C(params, "|")
140- let resArr = {
141- let $l = pools_params
142- let $s = size($l)
143- let $acc0 = nil
144- func $f0_1 ($a,$i) = if (($i >= $s))
145- then $a
146- else process($a, $l[$i])
147-
148- func $f0_2 ($a,$i) = if (($i >= $s))
149- then $a
150- else throw("List size exceeds 80")
151-
152- $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($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), 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)
153- }
154- let result = makeString_2C(resArr, "|")
155- nil
156- }
157-
158-
159-
160-@Callable(i)
161126 func test (s) = throw(s)
162127
163128

github/deemru/w8io/026f985 
34.07 ms