tx · FLsVwa6FbPRYBnCWnKMn2x3oeRqd2D3jAJzhrVTDmxbH 3MyRvoZJL2s56N6TK8RX1iJZcCXZkc77hcX: -0.00100000 Waves 2023.08.22 12:37 [2721644] smart account 3MyRvoZJL2s56N6TK8RX1iJZcCXZkc77hcX > SELF 0.00000000 Waves
{ "type": 13, "id": "FLsVwa6FbPRYBnCWnKMn2x3oeRqd2D3jAJzhrVTDmxbH", "fee": 100000, "feeAssetId": null, "timestamp": 1692697052816, "version": 2, "chainId": 84, "sender": "3MyRvoZJL2s56N6TK8RX1iJZcCXZkc77hcX", "senderPublicKey": "Bj1Bhn537ibh7az2kjDvbHshLHPXpyCyHm3t4bFQQ73k", "proofs": [ "39sdCwxPbrxESuVXKTyBrVzbS3AM7WjzJdncMD7gzzTLocYjGZbSuLoCYjhZVpTZNHqsVdMnzRuVtnt3b5Y5ar95" ], "script": "base64:BgIGCAISABIABAAFcG9vbDECIzNONUp1NjR1VFB1YVI0TTRmOVlCNUxSWVJOSjM4Mk1XcmF0AAVwb29sMgIjM015UnZvWkpMMnM1Nk42VEs4UlgxaUpaY0NYWmtjNzdoY1gABWZhcm0yAiMzTjJISFpYWFZuOTE0UXVUeFRBTng2dml6dVpnZUtSSk12agEFZnVuYzMCBmNhbGxlcgZvcmlnaW4DBgkAAgEJAKwCAgkArAICCQCsAgICCGNhbGxlcjogBQZjYWxsZXICCiwgb3JpZ2luOiAFBm9yaWdpbgAAAgFpAQVmdW5jMgAEBmNhbGxlcgkApQgBCAUBaQZjYWxsZXIEBm9yaWdpbgkApQgBCAUBaQxvcmlnaW5DYWxsZXIDBgkAAgEJAKwCAgkArAICCQCsAgICCGNhbGxlcjogBQZjYWxsZXICCiwgb3JpZ2luOiAFBm9yaWdpbgUDbmlsAWkBBWZ1bmMxAAQCbm4JAPwHBAkBB0FkZHJlc3MBCQDZBAEFBXBvb2wyAgVmdW5jMgUDbmlsBQNuaWwDCQAAAgUCbm4FAm5uBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4Agz1LNg==", "height": 2721644, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3xvDRTCdrDcZ8a3QBGxbDkaw8DMcXHXmXrcNicdCQjv4 Next: CiGQmwzGbbqvXQQSW4gkFamMfbQWYDLTJrp3WXtPuxNu Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func getAssetBalance (address,assetId) = { | |
5 | - | let a = assetBalance(address, assetId) | |
6 | - | a | |
7 | - | } | |
4 | + | let pool1 = "3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat" | |
8 | 5 | ||
6 | + | let pool2 = "3MyRvoZJL2s56N6TK8RX1iJZcCXZkc77hcX" | |
9 | 7 | ||
10 | - | func getWavesBalance (address) = { | |
11 | - | let w = wavesBalance(address).available | |
12 | - | w | |
13 | - | } | |
8 | + | let farm2 = "3N2HHZXXVn914QuTxTANx6vizuZgeKRJMvj" | |
14 | 9 | ||
15 | - | ||
16 | - | func getBalance (result,assetId) = { | |
17 | - | let address = take(result, 35) | |
18 | - | let addr = Address(fromBase58String(address)) | |
19 | - | let balance = if ((assetId == "WAVES")) | |
20 | - | then getWavesBalance(addr) | |
21 | - | else { | |
22 | - | let aId = fromBase58String(assetId) | |
23 | - | getAssetBalance(addr, aId) | |
24 | - | } | |
25 | - | let len = size(result) | |
26 | - | (((((address + drop(result, 35)) + assetId) + ":") + toString(balance)) + ",") | |
27 | - | } | |
28 | - | ||
29 | - | ||
30 | - | func doPools (poolParams) = { | |
31 | - | let arr = split_4C(poolParams, ";") | |
32 | - | let $t09491003 = $Tuple3(arr[0], arr[1], arr[2]) | |
33 | - | let address = $t09491003._1 | |
34 | - | let type = $t09491003._2 | |
35 | - | let assets = $t09491003._3 | |
36 | - | 0 | |
37 | - | } | |
38 | - | ||
39 | - | ||
40 | - | func test_loop (result,ele) = ele :: result | |
41 | - | ||
42 | - | ||
43 | - | func getBalancesStr (assetsStr,address) = { | |
44 | - | let assets = split_4C(assetsStr, ",") | |
45 | - | let res = { | |
46 | - | let $l = assets | |
47 | - | let $s = size($l) | |
48 | - | let $acc0 = address | |
49 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
50 | - | then $a | |
51 | - | else getBalance($a, $l[$i]) | |
52 | - | ||
53 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
54 | - | then $a | |
55 | - | else throw("List size exceeds 2") | |
56 | - | ||
57 | - | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
58 | - | } | |
59 | - | let balances = drop(res, 35) | |
60 | - | balances | |
61 | - | } | |
62 | - | ||
63 | - | ||
64 | - | func process (result,params) = { | |
65 | - | let arr = split_4C(params, ";") | |
66 | - | let $t014051462 = $Tuple3(arr[0], arr[1], arr[2]) | |
67 | - | let address = $t014051462._1 | |
68 | - | let type = $t014051462._2 | |
69 | - | let assetsStr = $t014051462._3 | |
70 | - | let assetsString = getBalancesStr(assetsStr, address) | |
71 | - | let resItem = ((address + "/") + assetsString) | |
72 | - | resItem :: result | |
73 | - | } | |
10 | + | func func3 (caller,origin) = if (true) | |
11 | + | then throw(((("caller: " + caller) + ", origin: ") + origin)) | |
12 | + | else 0 | |
74 | 13 | ||
75 | 14 | ||
76 | 15 | @Callable(i) | |
77 | - | func getWX (params) = { | |
78 | - | let pools_params = split_4C(params, "|") | |
79 | - | let resArr = { | |
80 | - | let $l = pools_params | |
81 | - | let $s = size($l) | |
82 | - | let $acc0 = nil | |
83 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
84 | - | then $a | |
85 | - | else process($a, $l[$i]) | |
86 | - | ||
87 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
88 | - | then $a | |
89 | - | else throw("List size exceeds 80") | |
90 | - | ||
91 | - | $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) | |
92 | - | } | |
93 | - | let result = makeString(resArr, "|") | |
94 | - | throw(result) | |
16 | + | func func2 () = { | |
17 | + | let caller = toString(i.caller) | |
18 | + | let origin = toString(i.originCaller) | |
19 | + | if (true) | |
20 | + | then throw(((("caller: " + caller) + ", origin: ") + origin)) | |
21 | + | else nil | |
95 | 22 | } | |
96 | 23 | ||
97 | 24 | ||
98 | 25 | ||
99 | 26 | @Callable(i) | |
100 | - | func test () = { | |
101 | - | let a = ["1", "2", "3", "4", "5"] | |
102 | - | let res = { | |
103 | - | let $l = a | |
104 | - | let $s = size($l) | |
105 | - | let $acc0 = nil | |
106 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
107 | - | then $a | |
108 | - | else test_loop($a, $l[$i]) | |
109 | - | ||
110 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
111 | - | then $a | |
112 | - | else throw("List size exceeds 10") | |
113 | - | ||
114 | - | $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) | |
115 | - | } | |
116 | - | let result = makeString(res, "*") | |
117 | - | throw(result) | |
27 | + | func func1 () = { | |
28 | + | let nn = invoke(Address(fromBase58String(pool2)), "func2", nil, nil) | |
29 | + | if ((nn == nn)) | |
30 | + | then nil | |
31 | + | else throw("Strict value is not equal to itself.") | |
118 | 32 | } | |
119 | 33 | ||
120 | 34 |
github/deemru/w8io/169f3d6 33.28 ms ◑