tx · BUj7WeR7M42ysMUYSGigXR6HDH5GDWSXbX3URNEDQLit 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2: -0.00200000 Waves 2023.04.25 21:12 [2550413] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves
{ "type": 13, "id": "BUj7WeR7M42ysMUYSGigXR6HDH5GDWSXbX3URNEDQLit", "fee": 200000, "feeAssetId": null, "timestamp": 1682446363433, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "21sSPZRHDaoGJoDte1eXV6Dvi7T13uT9k1jkXbMtCmmZ76ez5fo31wkptcqPHiVGftBqsPePrvotxYsjGEiJpeod" ], "script": "base64:BgITCAISBAoCCAgSAwoBCBIECgIICAUBD2dldEFzc2V0QmFsYW5jZQIHYWRkcmVzcwdhc3NldElkBAFhCQDwBwIFB2FkZHJlc3MFB2Fzc2V0SWQFAWEBD2dldFdhdmVzQmFsYW5jZQEHYWRkcmVzcwQBdwgJAO8HAQUHYWRkcmVzcwlhdmFpbGFibGUFAXcBEWdldEJhbGFuY2VfYmFja3VwAgdhZGRyZXNzB2Fzc2V0SWQEBGFkZHIJAQdBZGRyZXNzAQkA2QQBBQdhZGRyZXNzBANhSWQJANkEAQUHYXNzZXRJZAQHYmFsYW5jZQMJAAACBQdhc3NldElkAgVXQVZFUwkBD2dldFdhdmVzQmFsYW5jZQEFBGFkZHIJAQ9nZXRBc3NldEJhbGFuY2UCBQRhZGRyBQNhSWQJAKwCAgkArAICBQdhc3NldElkAgE6CQCkAwEFB2JhbGFuY2UBCmdldEJhbGFuY2UCBnJlc3VsdAdhc3NldElkBAdhZGRyZXNzCQCvAgIFBnJlc3VsdAAjBARhZGRyCQEHQWRkcmVzcwEJANkEAQUHYWRkcmVzcwQHYmFsYW5jZQMJAAACBQdhc3Nld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} View: original | compacted Prev: 12SUe4iXkBtY2kpY64JEUPfTqxPKLYgC7S2akP1CQ2PP Next: 6EDCKuMQ2roRRFbkYmaCgs6X2vkX272oQF9XYkzuGpiM Diff:
Old | New | Differences | |
---|---|---|---|
32 | 32 | let aId = fromBase58String(assetId) | |
33 | 33 | getAssetBalance(addr, aId) | |
34 | 34 | } | |
35 | - | ((drop(result, 35) + assetId) + ":") | |
35 | + | ((((drop(result, 35) + assetId) + ":") + toString(balance)) + ",") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func doPools (poolParams) = { | |
40 | 40 | let arr = split_4C(poolParams, ";") | |
41 | - | let $ | |
42 | - | let address = $ | |
43 | - | let type = $ | |
44 | - | let assets = $ | |
41 | + | let $t012491303 = $Tuple3(arr[0], arr[1], arr[2]) | |
42 | + | let address = $t012491303._1 | |
43 | + | let type = $t012491303._2 | |
44 | + | let assets = $t012491303._3 | |
45 | 45 | 0 | |
46 | 46 | } | |
47 | 47 |
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_backup (address,assetId) = { | |
17 | 17 | let addr = Address(fromBase58String(address)) | |
18 | 18 | let aId = fromBase58String(assetId) | |
19 | 19 | let balance = if ((assetId == "WAVES")) | |
20 | 20 | then getWavesBalance(addr) | |
21 | 21 | else getAssetBalance(addr, aId) | |
22 | 22 | ((assetId + ":") + toString(balance)) | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func getBalance (result,assetId) = { | |
27 | 27 | let address = take(result, 35) | |
28 | 28 | let addr = Address(fromBase58String(address)) | |
29 | 29 | let balance = if ((assetId == "WAVES")) | |
30 | 30 | then getWavesBalance(addr) | |
31 | 31 | else { | |
32 | 32 | let aId = fromBase58String(assetId) | |
33 | 33 | getAssetBalance(addr, aId) | |
34 | 34 | } | |
35 | - | ((drop(result, 35) + assetId) + ":") | |
35 | + | ((((drop(result, 35) + assetId) + ":") + toString(balance)) + ",") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func doPools (poolParams) = { | |
40 | 40 | let arr = split_4C(poolParams, ";") | |
41 | - | let $ | |
42 | - | let address = $ | |
43 | - | let type = $ | |
44 | - | let assets = $ | |
41 | + | let $t012491303 = $Tuple3(arr[0], arr[1], arr[2]) | |
42 | + | let address = $t012491303._1 | |
43 | + | let type = $t012491303._2 | |
44 | + | let assets = $t012491303._3 | |
45 | 45 | 0 | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(i) | |
50 | 50 | func asss (arg,address) = { | |
51 | 51 | let assets = split_4C(arg, ",") | |
52 | 52 | let res = { | |
53 | 53 | let $l = assets | |
54 | 54 | let $s = size($l) | |
55 | 55 | let $acc0 = address | |
56 | 56 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
57 | 57 | then $a | |
58 | 58 | else getBalance($a, $l[$i]) | |
59 | 59 | ||
60 | 60 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
61 | 61 | then $a | |
62 | 62 | else throw("List size exceeds 10") | |
63 | 63 | ||
64 | 64 | $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) | |
65 | 65 | } | |
66 | 66 | throw(("result: " + res)) | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | ||
71 | 71 | @Callable(i) | |
72 | 72 | func get (params) = { | |
73 | 73 | let pools = split_4C(params, "|") | |
74 | 74 | nil | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | ||
79 | 79 | @Callable(i) | |
80 | 80 | func test (address,assetId) = nil | |
81 | 81 | ||
82 | 82 |
github/deemru/w8io/026f985 33.81 ms ◑