tx · 7QFFvqgiKWDdWe1ZTM3AMz7HyP7ehUwEZgUHiqSguJZ9 3MrT6o7YAdo3KMs4cTvd2WU8WDYVMUyEdri: -0.01000000 Waves 2022.04.17 05:54 [2011964] smart account 3MrT6o7YAdo3KMs4cTvd2WU8WDYVMUyEdri > SELF 0.00000000 Waves
{ "type": 13, "id": "7QFFvqgiKWDdWe1ZTM3AMz7HyP7ehUwEZgUHiqSguJZ9", "fee": 1000000, "feeAssetId": null, "timestamp": 1650164062635, "version": 2, "chainId": 84, "sender": "3MrT6o7YAdo3KMs4cTvd2WU8WDYVMUyEdri", "senderPublicKey": "FGHViFjw9c8erhypDqmSN7Rejo83uy7EuBm9VdnZFutH", "proofs": [ "4s9rHJFuxd3x4JXRLyKmn91SYYQiGFYf16vrkz341dCi3MV4vxHxRMCBYmKYr7U5A5act82JeuqpXp41ekyJ8wRP" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAABQEAAAAFYXNJbnQAAAABAAAABXZhbHVlBAAAAAckbWF0Y2gwBQAAAAV2YWx1ZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAANpbnQFAAAAByRtYXRjaDAFAAAAA2ludAkAAAIAAAABAgAAAA1leHBlY3RlZDogSW50AQAAABFhc1VzZXJCYWxhbmNlRGF0YQAAAAEAAAAFdmFsdWUEAAAAByRtYXRjaDAFAAAABXZhbHVlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAACIoSW50LCBJbnQsIEludCwgSW50LCBJbnQsIEJvb2xlYW4pBAAAAAF4BQAAAAckbWF0Y2gwBQAAAAF4BAAAAAF0BQAAAAckbWF0Y2gwCQAAAgAAAAECAAAAIndyb25nIHR5cGUsIGV4cGVjdGVkOiBJbnQ1JkJvb2xlYW4AAAAABG1haW4JAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNQQVp2OXRnSzFQWDdkS1I3YjRrY2hxNXFkcFVTM0c1c1lUAAAAAA9hc3NldFN0c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": 0 } View: original | compacted Prev: GBCWCN9NYhEF2Aw5SUPmBM4bvcu82XGFBULuVGFkGBwf Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = b | |
6 | 6 | if ($isInstanceOf(c, "Int")) | |
7 | 7 | then { | |
8 | 8 | let d = c | |
9 | 9 | d | |
10 | 10 | } | |
11 | 11 | else throw("expected: Int") | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func e (b) = { | |
16 | 16 | let c = b | |
17 | 17 | if ($isInstanceOf(c, "(Int, Int, Int, Int, Int, Boolean)")) | |
18 | 18 | then { | |
19 | 19 | let f = c | |
20 | 20 | f | |
21 | 21 | } | |
22 | 22 | else { | |
23 | 23 | let g = c | |
24 | 24 | throw("wrong type, expected: Int5&Boolean") | |
25 | 25 | } | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | let h = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") | |
30 | 30 | ||
31 | 31 | let i = "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" | |
32 | 32 | ||
33 | 33 | let j = addressFromStringValue("3PEiD1zJWTMZNWSCyzhvBw9pxxAWeEwaghR") | |
34 | 34 | ||
35 | 35 | @Callable(k) | |
36 | 36 | func withdraw (l) = { | |
37 | 37 | let m = fromBase58String(i) | |
38 | 38 | let n = assetBalance(j, m) | |
39 | 39 | if ((l > n)) | |
40 | 40 | then throw(toString(n)) | |
41 | 41 | else { | |
42 | 42 | let o = e(invoke(j, "userBalance", [toString(this)], nil)) | |
43 | 43 | let p = o._3 | |
44 | 44 | let q = if ((n > p)) | |
45 | 45 | then p | |
46 | 46 | else n | |
47 | 47 | if ((l > q)) | |
48 | 48 | then throw(toString(q)) | |
49 | 49 | else { | |
50 | 50 | let r = a(invoke(h, "withdraw", [i, q], nil)) | |
51 | 51 | $Tuple2(nil, r) | |
52 | 52 | } | |
53 | 53 | } | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 |
github/deemru/w8io/169f3d6 27.26 ms ◑