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:BgIPCAISBAoCCAgSABIDCgEIBQEPZ2V0QXNzZXRCYWxhbmNlAgdhZGRyZXNzB2Fzc2V0SWQEAWEJAPAHAgUHYWRkcmVzcwUHYXNzZXRJZAUBYQEPZ2V0V2F2ZXNCYWxhbmNlAQdhZGRyZXNzBAF3CAkA7wcBBQdhZGRyZXNzCWF2YWlsYWJsZQUBdwEKZ2V0QmFsYW5jZQIGcmVzdWx0B2Fzc2V0SWQEB2FkZHJlc3MJAK8CAgUGcmVzdWx0ACMEBGFkZHIJAQdBZGRyZXNzAQkA2QQBBQdhZGRyZXNzBAdiYWxhbmNlAwkAAAIFB2Fzc2V0SWQCBVdBVkVTCQEPZ2V0V2F2ZXNCYWxhbmNlAQUEYWRkcgQDYUlkCQDZBAEFB2Fzc2V0SWQJAQ9nZXRBc3NldEJhbGFuY2UCBQRhZGRyBQNhSWQEA2xlbgkAsQIBBQZyZXN1bHQJAKwCAgkArAICCQCsAgIJAKwCAgkArAICBQdhZGRyZXNzCQCwAgIFBnJlc3VsdAAjBQdhc3NldElkAgE6CQCkAwEFB2JhbGFuY2UCASwBB2RvUG9vbH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MaXN0IHNpemUgZXhjZWVkcyAxMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKBAZyZXN1bHQJALkJAgUDcmVzAgEqCQACAQUGcmVzdWx0AWkBA2dldAEGcGFyYW1zBAVwb29scwkAvAkCBQZwYXJhbXMCAXwFA25pbADdyhLB", "height": 2550455, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CAT6FwCswVmwJWagoSEXxVd3SHXeym85ebAjcwQcdEdd Next: GErDwtn8AyQHUx9mF7pUohd6vm6cxF1wYUDwYmHPRHTo Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | + | func loop (result,ele) = ele :: result | |
41 | + | ||
42 | + | ||
40 | 43 | @Callable(i) | |
41 | 44 | func asss (assetsStr,address) = { | |
42 | 45 | let assets = split_4C(assetsStr, ",") | |
61 | 64 | ||
62 | 65 | ||
63 | 66 | @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) | |
64 | 90 | func get (params) = { | |
65 | 91 | let pools = split_4C(params, "|") | |
66 | 92 | nil | |
67 | 93 | } | |
68 | 94 | ||
69 | 95 | ||
70 | - | ||
71 | - | @Callable(i) | |
72 | - | func test (address,assetId) = nil | |
73 | - | ||
74 | - |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getAssetBalance (address,assetId) = { | |
5 | 5 | let a = assetBalance(address, assetId) | |
6 | 6 | a | |
7 | 7 | } | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func getWavesBalance (address) = { | |
11 | 11 | let w = wavesBalance(address).available | |
12 | 12 | w | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func getBalance (result,assetId) = { | |
17 | 17 | let address = take(result, 35) | |
18 | 18 | let addr = Address(fromBase58String(address)) | |
19 | 19 | let balance = if ((assetId == "WAVES")) | |
20 | 20 | then getWavesBalance(addr) | |
21 | 21 | else { | |
22 | 22 | let aId = fromBase58String(assetId) | |
23 | 23 | getAssetBalance(addr, aId) | |
24 | 24 | } | |
25 | 25 | let len = size(result) | |
26 | 26 | (((((address + drop(result, 35)) + assetId) + ":") + toString(balance)) + ",") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func doPools (poolParams) = { | |
31 | 31 | let arr = split_4C(poolParams, ";") | |
32 | 32 | let $t09491003 = $Tuple3(arr[0], arr[1], arr[2]) | |
33 | 33 | let address = $t09491003._1 | |
34 | 34 | let type = $t09491003._2 | |
35 | 35 | let assets = $t09491003._3 | |
36 | 36 | 0 | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | + | func loop (result,ele) = ele :: result | |
41 | + | ||
42 | + | ||
40 | 43 | @Callable(i) | |
41 | 44 | func asss (assetsStr,address) = { | |
42 | 45 | let assets = split_4C(assetsStr, ",") | |
43 | 46 | let res = { | |
44 | 47 | let $l = assets | |
45 | 48 | let $s = size($l) | |
46 | 49 | let $acc0 = address | |
47 | 50 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
48 | 51 | then $a | |
49 | 52 | else getBalance($a, $l[$i]) | |
50 | 53 | ||
51 | 54 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
52 | 55 | then $a | |
53 | 56 | else throw("List size exceeds 10") | |
54 | 57 | ||
55 | 58 | $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) | |
56 | 59 | } | |
57 | 60 | let balances = drop(res, 35) | |
58 | 61 | throw(("result: " + balances)) | |
59 | 62 | } | |
60 | 63 | ||
61 | 64 | ||
62 | 65 | ||
63 | 66 | @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) | |
64 | 90 | func get (params) = { | |
65 | 91 | let pools = split_4C(params, "|") | |
66 | 92 | nil | |
67 | 93 | } | |
68 | 94 | ||
69 | 95 | ||
70 | - | ||
71 | - | @Callable(i) | |
72 | - | func test (address,assetId) = nil | |
73 | - | ||
74 | - |
github/deemru/w8io/026f985 45.89 ms ◑