tx · 8zW1Lim1B7VF1UpAMBGiYhxzkmcA1qQPnoor4rykKCkD

3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2:  -0.00200000 Waves

2023.04.25 21:52 [2550455] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves

{ "type": 13, "id": "8zW1Lim1B7VF1UpAMBGiYhxzkmcA1qQPnoor4rykKCkD", "fee": 200000, "feeAssetId": null, "timestamp": 1682448799033, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "4XvJjFt853oPXfpxA6k5obbmT78NjNR6qQkPRxLHa73ceqJztg13dvUM97HsQ1SJF1SHmCgjptsgvzLkS982Qtfw" ], "script": "base64:BgIPCAISBAoCCAgSABIDCgEIBQEPZ2V0QXNzZXRCYWxhbmNlAgdhZGRyZXNzB2Fzc2V0SWQEAWEJAPAHAgUHYWRkcmVzcwUHYXNzZXRJZAUBYQEPZ2V0V2F2ZXNCYWxhbmNlAQdhZGRyZXNzBAF3CAkA7wcBBQdhZGRyZXNzCWF2YWlsYWJsZQUBdwEKZ2V0QmFsYW5jZQIGcmVzdWx0B2Fzc2V0SWQEB2FkZHJlc3MJAK8CAgUGcmVzdWx0ACMEBGFkZHIJAQdBZGRyZXNzAQkA2QQBBQdhZGRyZXNzBAdiYWxhbmNlAwkAAAIFB2Fzc2V0SWQCBVdBVkVTCQEPZ2V0V2F2ZXNCYWxhbmNlAQUEYWRkcgQDYUlkCQDZBAEFB2Fzc2V0SWQJAQ9nZXRBc3NldEJhbGFuY2UCBQRhZGRyBQNhSWQEA2xlbgkAsQIBBQZyZXN1bHQJAKwCAgkArAICCQCsAgIJAKwCAgkArAICBQdhZGRyZXNzCQCwAgIFBnJlc3VsdAAjBQdhc3NldElkAgE6CQCkAwEFB2JhbGFuY2UCASwBB2RvUG9vb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RMaXN0IHNpemUgZXhjZWVkcyAxMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKBAZyZXN1bHQJALkJAgUDcmVzAgEqCQACAQUGcmVzdWx0AWkBA2dldAEGcGFyYW1zBAVwb29scwkAvAkCBQZwYXJhbXMCAXwFA25pbADdyhLB", "height": 2550455, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CAT6FwCswVmwJWagoSEXxVd3SHXeym85ebAjcwQcdEdd Next: GErDwtn8AyQHUx9mF7pUohd6vm6cxF1wYUDwYmHPRHTo Diff:
OldNewDifferences
3737 }
3838
3939
40+func loop (result,ele) = ele :: result
41+
42+
4043 @Callable(i)
4144 func asss (assetsStr,address) = {
4245 let assets = split_4C(assetsStr, ",")
6164
6265
6366 @Callable(i)
67+func test () = {
68+ let a = ["1", "2", "3", "4", "5"]
69+ let res = {
70+ let $l = a
71+ let $s = size($l)
72+ let $acc0 = nil
73+ func $f0_1 ($a,$i) = if (($i >= $s))
74+ then $a
75+ else loop($a, $l[$i])
76+
77+ func $f0_2 ($a,$i) = if (($i >= $s))
78+ then $a
79+ else throw("List size exceeds 10")
80+
81+ $f0_2($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)
82+ }
83+ let result = makeString(res, "*")
84+ throw(result)
85+ }
86+
87+
88+
89+@Callable(i)
6490 func get (params) = {
6591 let pools = split_4C(params, "|")
6692 nil
6793 }
6894
6995
70-
71-@Callable(i)
72-func test (address,assetId) = nil
73-
74-
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getAssetBalance (address,assetId) = {
55 let a = assetBalance(address, assetId)
66 a
77 }
88
99
1010 func getWavesBalance (address) = {
1111 let w = wavesBalance(address).available
1212 w
1313 }
1414
1515
1616 func getBalance (result,assetId) = {
1717 let address = take(result, 35)
1818 let addr = Address(fromBase58String(address))
1919 let balance = if ((assetId == "WAVES"))
2020 then getWavesBalance(addr)
2121 else {
2222 let aId = fromBase58String(assetId)
2323 getAssetBalance(addr, aId)
2424 }
2525 let len = size(result)
2626 (((((address + drop(result, 35)) + assetId) + ":") + toString(balance)) + ",")
2727 }
2828
2929
3030 func doPools (poolParams) = {
3131 let arr = split_4C(poolParams, ";")
3232 let $t09491003 = $Tuple3(arr[0], arr[1], arr[2])
3333 let address = $t09491003._1
3434 let type = $t09491003._2
3535 let assets = $t09491003._3
3636 0
3737 }
3838
3939
40+func loop (result,ele) = ele :: result
41+
42+
4043 @Callable(i)
4144 func asss (assetsStr,address) = {
4245 let assets = split_4C(assetsStr, ",")
4346 let res = {
4447 let $l = assets
4548 let $s = size($l)
4649 let $acc0 = address
4750 func $f0_1 ($a,$i) = if (($i >= $s))
4851 then $a
4952 else getBalance($a, $l[$i])
5053
5154 func $f0_2 ($a,$i) = if (($i >= $s))
5255 then $a
5356 else throw("List size exceeds 10")
5457
5558 $f0_2($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)
5659 }
5760 let balances = drop(res, 35)
5861 throw(("result: " + balances))
5962 }
6063
6164
6265
6366 @Callable(i)
67+func test () = {
68+ let a = ["1", "2", "3", "4", "5"]
69+ let res = {
70+ let $l = a
71+ let $s = size($l)
72+ let $acc0 = nil
73+ func $f0_1 ($a,$i) = if (($i >= $s))
74+ then $a
75+ else loop($a, $l[$i])
76+
77+ func $f0_2 ($a,$i) = if (($i >= $s))
78+ then $a
79+ else throw("List size exceeds 10")
80+
81+ $f0_2($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)
82+ }
83+ let result = makeString(res, "*")
84+ throw(result)
85+ }
86+
87+
88+
89+@Callable(i)
6490 func get (params) = {
6591 let pools = split_4C(params, "|")
6692 nil
6793 }
6894
6995
70-
71-@Callable(i)
72-func test (address,assetId) = nil
73-
74-

github/deemru/w8io/026f985 
45.89 ms