tx · HwSfynF9bfcfMBFdEwqESt6tvoGyCG9bLKMMzNmiqJcT

3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2:  -0.00500000 Waves

2023.04.25 23:59 [2550580] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves

{ "type": 13, "id": "HwSfynF9bfcfMBFdEwqESt6tvoGyCG9bLKMMzNmiqJcT", "fee": 500000, "feeAssetId": null, "timestamp": 1682456356622, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "5mvjQRHBF6isx48vosyBXb7hEDmbdoD8dBeDFQrSL4Rma69Wy3JAA4aaYwtKeACx6geQpYeP3m1d7Zf2KyKjk6vv" ], "script": "base64:BgIRCAISAwoBCBIDCgEIEgMKAQgPAApLX2FtX2FzX2lkAg8lc19fYW1vdW50QXNzZXQACktfcHJfYXNfaWQCDiVzX19wcmljZUFzc2V0AAVLX2FtcAIHJXNfX2FtcAAHS19zaGFyZQJEJXMlc19fc2hhcmVBc3NldEJhbGFuY2VfX1lpTmJvZkZ6QzE3akVISENNd3JSY3B5OU1ycmphYk1NTFp4ZzhnNXhtZjcACEtfc3Rha2VkAhklcyVzX19zdGFrZWRCYWxhbmNlX1dBVkVTAQx0cnlHZXRTdHJpbmcCA2tleQdhZGRyZXNzBAckbWF0Y2gwCQCdCAIFB2FkZHJlc3MFA2tleQMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAWIFByRtYXRjaDAFAWICAAENdHJ5R2V0SW50ZWdlcgIDa2V5B2FkZHJlc3MEByRtYXRjaDAJAJoIAgUHYWRkcmVzcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAAAQ9nZXRBc3NldEJhbGFuY2UCB2FkZHJlc3MHYXNzZXRJZAQBYQkA8AcCBQdhZGRyZXN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ECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUAQGcmVzdWx0CQC6CQIFBnJlc0FycgIBfAUDbmlsAWkBBHRlc3QBAXMJAAIBBQFzALvIjLE=", "height": 2550580, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6Rb5ZBoSJ4UTtWDVMKVEZEKbKdsA5Kw4cdgNwHrU3r5T Next: 2eJr9ENwuUSAUUJVoAWqTssr6Ex9Q9XNo73MtYSuuWMi Diff:
OldNewDifferences
106106 let assetsStr = $t024722515._1
107107 let datas = $t024722515._2
108108 let assetsString = getBalancesStr(assetsStr, address)
109- let resItem = ((address + "/") + assetsString)
109+ let resItem = ((((address + "/") + assetsString) + "/") + datas)
110110 resItem :: result
111111 }
112112
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 = tryGetString(K_amp, addr)
6161 let share = tryGetInteger(K_share, addr)
6262 let stake = tryGetInteger(K_staked, addr)
6363 $Tuple2(((amountId + ",") + priceId), (((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
9292 func process (result,params) = {
9393 let arr = split_4C(params, ";")
9494 let $t022102267 = $Tuple3(arr[0], arr[1], arr[2])
9595 let address = $t022102267._1
9696 let type = $t022102267._2
9797 let assetsStr = $t022102267._3
9898 let assetsString = getBalancesStr(assetsStr, address)
9999 let resItem = ((address + "/") + assetsString)
100100 resItem :: result
101101 }
102102
103103
104104 func processNew (result,address) = {
105105 let $t024722515 = getWxData(address)
106106 let assetsStr = $t024722515._1
107107 let datas = $t024722515._2
108108 let assetsString = getBalancesStr(assetsStr, address)
109- let resItem = ((address + "/") + assetsString)
109+ let resItem = ((((address + "/") + assetsString) + "/") + datas)
110110 resItem :: result
111111 }
112112
113113
114114 @Callable(i)
115115 func getWXNew (params) = {
116116 let pools = split_4C(params, ",")
117117 let resArr = {
118118 let $l = pools
119119 let $s = size($l)
120120 let $acc0 = nil
121121 func $f0_1 ($a,$i) = if (($i >= $s))
122122 then $a
123123 else processNew($a, $l[$i])
124124
125125 func $f0_2 ($a,$i) = if (($i >= $s))
126126 then $a
127127 else throw("List size exceeds 80")
128128
129129 $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)
130130 }
131131 let result = makeString_11C(resArr, "|")
132132 throw(result)
133133 }
134134
135135
136136
137137 @Callable(i)
138138 func getWX (params) = {
139139 let pools_params = split_4C(params, "|")
140140 let resArr = {
141141 let $l = pools_params
142142 let $s = size($l)
143143 let $acc0 = nil
144144 func $f0_1 ($a,$i) = if (($i >= $s))
145145 then $a
146146 else process($a, $l[$i])
147147
148148 func $f0_2 ($a,$i) = if (($i >= $s))
149149 then $a
150150 else throw("List size exceeds 80")
151151
152152 $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)
153153 }
154154 let result = makeString_2C(resArr, "|")
155155 nil
156156 }
157157
158158
159159
160160 @Callable(i)
161161 func test (s) = throw(s)
162162
163163

github/deemru/w8io/026f985 
37.68 ms