tx · 74iaT2CfNrC9JpB5qTRMCcWM4pmTLm6qQJT94bKo1tS7 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2: -0.00300000 Waves 2023.04.25 22:53 [2550515] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves
{ "type": 13, "id": "74iaT2CfNrC9JpB5qTRMCcWM4pmTLm6qQJT94bKo1tS7", "fee": 300000, "feeAssetId": null, "timestamp": 1682452401332, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "3e9DewLrum9thGBY1ByEB1mGsrJPEtDkjBRjkPxgqWLUSdGd9REfsQQyWbzpsWeYeWWUiZ2USobc2jy2sqiMJ7d2" ], "script": "base64:BgIMCAISAwoBCBIDCgEIBwEPZ2V0QXNzZXRCYWxhbmNlAgdhZGRyZXNzB2Fzc2V0SWQEAWEJAPAHAgUHYWRkcmVzcwUHYXNzZXRJZAUBYQEPZ2V0V2F2ZXNCYWxhbmNlAQdhZGRyZXNzBAF3CAkA7wcBBQdhZGRyZXNzCWF2YWlsYWJsZQUBdwEKZ2V0QmFsYW5jZQIGcmVzdWx0B2Fzc2V0SWQEB2FkZHJlc3MJAK8CAgUGcmVzdWx0ACMEBGFkZHIJAQdBZGRyZXNzAQkA2QQBBQdhZGRyZXNzBAdiYWxhbmNlAwkAAAIFB2Fzc2V0SWQCBVdBVkVTCQEPZ2V0V2F2ZXNCYWxhbmNlAQUEYWRkcgQDYUlkCQDZBAEFB2Fzc2V0SWQJAQ9nZXRBc3NldEJhbGFuY2UCBQRhZGRyBQNhSWQEA2xlbgkAsQIBBQZyZXN1bHQJAKwCAgkArAICCQCsAgIJAKwCAgkArAICBQdhZGRyZXNzCQCwAgIFBnJlc3VsdAAjBQdhc3NldElkAgE6CQCkAwEFB2JhbGFuY2UCASwBB2RvUG9v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UkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdAB4AHwAgACEAIgAjACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA7ADwAPQA+AD8AQABBAEIAQwBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQBAZyZXN1bHQJALoJAgUGcmVzQXJyAgF8CQACAQUGcmVzdWx0AWkBBHRlc3QBAXMJAAIBBQFzAEyssIA=", "height": 2550515, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CPMEdqZaGoJtHZRSJgV8bRN6Z3j3tiae94aQhaxDvf4g Next: Hrew37qFfXtNhzjzzf842hpmxsDm7F1EZmZjjqoXpx5K Diff:
Old | New | Differences | |
---|---|---|---|
58 | 58 | } | |
59 | 59 | let balances = drop(res, 35) | |
60 | 60 | let bals = dropRight(balances, 1) | |
61 | - | | |
61 | + | bals | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func process (result,params) = { | |
66 | 66 | let arr = split_4C(params, ";") | |
67 | - | let $ | |
68 | - | let address = $ | |
69 | - | let type = $ | |
70 | - | let assetsStr = $ | |
67 | + | let $t014391496 = $Tuple3(arr[0], arr[1], arr[2]) | |
68 | + | let address = $t014391496._1 | |
69 | + | let type = $t014391496._2 | |
70 | + | let assetsStr = $t014391496._3 | |
71 | 71 | let assetsString = getBalancesStr(assetsStr, address) | |
72 | 72 | let resItem = ((address + "/") + assetsString) | |
73 | 73 | resItem :: result |
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 | 40 | func test_loop (result,ele) = ele :: result | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func getBalancesStr (assetsStr,address) = { | |
44 | 44 | let assets = split_4C(assetsStr, ",") | |
45 | 45 | let res = { | |
46 | 46 | let $l = assets | |
47 | 47 | let $s = size($l) | |
48 | 48 | let $acc0 = address | |
49 | 49 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
50 | 50 | then $a | |
51 | 51 | else getBalance($a, $l[$i]) | |
52 | 52 | ||
53 | 53 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
54 | 54 | then $a | |
55 | 55 | else throw("List size exceeds 2") | |
56 | 56 | ||
57 | 57 | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
58 | 58 | } | |
59 | 59 | let balances = drop(res, 35) | |
60 | 60 | let bals = dropRight(balances, 1) | |
61 | - | | |
61 | + | bals | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func process (result,params) = { | |
66 | 66 | let arr = split_4C(params, ";") | |
67 | - | let $ | |
68 | - | let address = $ | |
69 | - | let type = $ | |
70 | - | let assetsStr = $ | |
67 | + | let $t014391496 = $Tuple3(arr[0], arr[1], arr[2]) | |
68 | + | let address = $t014391496._1 | |
69 | + | let type = $t014391496._2 | |
70 | + | let assetsStr = $t014391496._3 | |
71 | 71 | let assetsString = getBalancesStr(assetsStr, address) | |
72 | 72 | let resItem = ((address + "/") + assetsString) | |
73 | 73 | resItem :: result | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | @Callable(i) | |
78 | 78 | func getWX (params) = { | |
79 | 79 | let pools_params = split_4C(params, "|") | |
80 | 80 | let resArr = { | |
81 | 81 | let $l = pools_params | |
82 | 82 | let $s = size($l) | |
83 | 83 | let $acc0 = nil | |
84 | 84 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
85 | 85 | then $a | |
86 | 86 | else process($a, $l[$i]) | |
87 | 87 | ||
88 | 88 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
89 | 89 | then $a | |
90 | 90 | else throw("List size exceeds 80") | |
91 | 91 | ||
92 | 92 | $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) | |
93 | 93 | } | |
94 | 94 | let result = makeString_2C(resArr, "|") | |
95 | 95 | throw(result) | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(i) | |
101 | 101 | func test (s) = throw(s) | |
102 | 102 | ||
103 | 103 |
github/deemru/w8io/03bedc9 31.40 ms ◑![]()