tx · 4UFK8w1YW8JKiQDdG9vMX7LzG2UnxbywQfxNMyb8QVqq 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2: -0.00300000 Waves 2023.04.25 22:45 [2550508] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves
{ "type": 13, "id": "4UFK8w1YW8JKiQDdG9vMX7LzG2UnxbywQfxNMyb8QVqq", "fee": 300000, "feeAssetId": null, "timestamp": 1682452014884, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "cfkx1dvcpz4FpNd1ZfJbnPwBzEiMFSK7oWmdZ6kWSYJWfcHP3HsGuYxUaURU3xjUNsJZFxvAfRWDngYmWwCNfYp" ], "script": "base64:BgIMCAISAwoBCBIDCgEIBwEPZ2V0QXNzZXRCYWxhbmNlAgdhZGRyZXNzB2Fzc2V0SWQEAWEJAPAHAgUHYWRkcmVzcwUHYXNzZXRJZAUBYQEPZ2V0V2F2ZXNCYWxhbmNlAQdhZGRyZXNzBAF3CAkA7wcBBQdhZGRyZXNzCWF2YWlsYWJsZQUBdwEKZ2V0QmFsYW5jZQIGcmVzdWx0B2Fzc2V0SWQEB2FkZHJlc3MJAK8CAgUGcmVzdWx0ACMEBGFkZHIJAQdBZGRyZXNzAQkA2QQBBQdhZGRyZXNzBAdiYWxhbmNlAwkAAAIFB2Fzc2V0SWQCBVdBVkVTCQEPZ2V0V2F2ZXNCYWxhbmNlAQUEYWRkcgQDYUlkCQDZBAEFB2Fzc2V0SWQJAQ9nZXRBc3NldEJhbGFuY2UCBQRhZGRyBQNhSWQEA2xlbgkAsQIBBQZyZXN1bHQJAKwCAgkArAICCQCsAgIJAKwCAgkArAICBQdhZGRyZXNzCQCwAgIFBnJlc3VsdAAjBQdhc3NldElkAgE6CQCkAwEFB2JhbGFuY2UCASwBB2R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wXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUAQGcmVzdWx0CQC5CQIFBnJlc0FycgIBfAkAAgEFBnJlc3VsdAFpAQR0ZXN0AQFzCQACAQUBcwBSyWxA", "height": 2550508, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4K3HusN3QcHdVxM2CXv9yxRxnr4WKpK7HNs7nt2MdrRM Next: CPMEdqZaGoJtHZRSJgV8bRN6Z3j3tiae94aQhaxDvf4g Diff:
Old | New | Differences | |
---|---|---|---|
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(i) | |
101 | - | func test () = { | |
102 | - | let a = ["1", "2", "3", "4", "5"] | |
103 | - | let res = { | |
104 | - | let $l = a | |
105 | - | let $s = size($l) | |
106 | - | let $acc0 = nil | |
107 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
108 | - | then $a | |
109 | - | else test_loop($a, $l[$i]) | |
110 | - | ||
111 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
112 | - | then $a | |
113 | - | else throw("List size exceeds 10") | |
114 | - | ||
115 | - | $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) | |
116 | - | } | |
117 | - | let result = makeString(res, "*") | |
118 | - | throw(result) | |
119 | - | } | |
101 | + | func test (s) = throw(s) | |
120 | 102 | ||
121 | 103 |
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 | balances | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func process (result,params) = { | |
66 | 66 | let arr = split_4C(params, ";") | |
67 | 67 | let $t014431500 = $Tuple3(arr[0], arr[1], arr[2]) | |
68 | 68 | let address = $t014431500._1 | |
69 | 69 | let type = $t014431500._2 | |
70 | 70 | let assetsStr = $t014431500._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(resArr, "|") | |
95 | 95 | throw(result) | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(i) | |
101 | - | func test () = { | |
102 | - | let a = ["1", "2", "3", "4", "5"] | |
103 | - | let res = { | |
104 | - | let $l = a | |
105 | - | let $s = size($l) | |
106 | - | let $acc0 = nil | |
107 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
108 | - | then $a | |
109 | - | else test_loop($a, $l[$i]) | |
110 | - | ||
111 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
112 | - | then $a | |
113 | - | else throw("List size exceeds 10") | |
114 | - | ||
115 | - | $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) | |
116 | - | } | |
117 | - | let result = makeString(res, "*") | |
118 | - | throw(result) | |
119 | - | } | |
101 | + | func test (s) = throw(s) | |
120 | 102 | ||
121 | 103 |
github/deemru/w8io/03bedc9 62.79 ms ◑![]()