tx · 4znRZigWURLw6KWiJHdC7SwFkKQ6DrV8KJqLsmaKLhMV 3N1iBA7nz6KkAP7RaHtQxU3TC1io912SWBz: -0.01000000 Waves 2022.04.12 18:03 [2005514] smart account 3N1iBA7nz6KkAP7RaHtQxU3TC1io912SWBz > SELF 0.00000000 Waves
{ "type": 13, "id": "4znRZigWURLw6KWiJHdC7SwFkKQ6DrV8KJqLsmaKLhMV", "fee": 1000000, "feeAssetId": null, "timestamp": 1649775836852, "version": 1, "sender": "3N1iBA7nz6KkAP7RaHtQxU3TC1io912SWBz", "senderPublicKey": "upcZco3mz5KhMJ6hafUZU18QAKjN92atRHzDfYdeJJt", "proofs": [ "54tnhZxUtpXaLfJ1CSwK4e32mrvSYCGq8eMUTph8iU137waD3B2EyKZ5dai1K9oUHQyEqM6VwKVgpqFJue1Tf6Vs" ], "script": "base64:AAIFAAAAAAAAABIIAhIAEgMKAQESBwoFBAIBCB8AAAAAAAAAAwAAAANjdHgBAAAAB2RlcG9zaXQAAAAABAAAAANwbXQDCQAAZgAAAAIJAAGQAAAAAQgFAAAAA2N0eAAAAAhwYXltZW50cwAAAAAAAAAAAAkAAZEAAAACCAUAAAADY3R4AAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAHUF0IGxlYXN0IG9uZSBwYXltZW50IGV4cGVjdGVkBAAAAAdhc3NldElkAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAG09ubHkgV0FWRVMgcGF5bWVudCBhY2NlcHRlZAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkABCUAAAABCAUAAAADY3R4AAAABmNhbGxlcggFAAAAA3BtdAAAAAZhbW91bnQFAAAAA25pbAAAAANjdHgBAAAACHdpdGhkcmF3AAAAAQAAAAZhbW91bnQEAAAAB2FkZHJlc3MJAAQlAAAAAQgFAAAAA2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AAAAIkaQoBAAAABSRmMF8yAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABNMaXN0IHNpemUgZXhjZWVkcyA1CQEAAAAFJGYwXzIAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQAAAABWejDo", "chainId": 84, "height": 2005514, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 14C6tdG1EZFpvkYuVGRfc1c2V2pfn54UZBWSh4AQMnZe Next: 7n2ZAjBNWS1rPMiagEnEsTRkce9cmGXEnMGR76X9zcYL Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func deposit () = { | |
8 | 8 | let b = if ((size(a.payments) > 0)) | |
9 | 9 | then a.payments[0] | |
10 | 10 | else throw("At least one payment expected") | |
11 | 11 | let c = if (isDefined(b.assetId)) | |
12 | 12 | then value(b.assetId) | |
13 | 13 | else throw("Only WAVES payment accepted") | |
14 | 14 | [IntegerEntry(toString(a.caller), b.amount)] | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(a) | |
20 | 20 | func withdraw (d) = { | |
21 | 21 | let e = toString(a.caller) | |
22 | 22 | let f = valueOrErrorMessage(getInteger(this, e), "You don't have a deposit") | |
23 | 23 | let g = if (if ((d > 0)) | |
24 | 24 | then true | |
25 | 25 | else (d > f)) | |
26 | 26 | then d | |
27 | 27 | else throw("Amount to withdraw must be more than 0 and less than current deposit") | |
28 | 28 | if ((d == f)) | |
29 | 29 | then [DeleteEntry(e)] | |
30 | 30 | else [IntegerEntry(e, (f - d)), ScriptTransfer(a.caller, d, unit)] | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | 35 | @Callable(a) | |
36 | 36 | func allArgTypes (h,i,j,k,l) = { | |
37 | 37 | let m = [1, 2, 3, 4, 5] | |
38 | 38 | func n (o,p) = if ((p >= size(l))) | |
39 | 39 | then o | |
40 | 40 | else { | |
41 | 41 | let q = toString(p) | |
42 | 42 | (o :+ { | |
43 | 43 | let r = l[p] | |
44 | 44 | if ($isInstanceOf(r, "Boolean")) | |
45 | 45 | then { | |
46 | 46 | let s = r | |
47 | 47 | BooleanEntry((q + "-bool"), s) | |
48 | 48 | } | |
49 | 49 | else if ($isInstanceOf(r, "ByteVector")) | |
50 | 50 | then { | |
51 | 51 | let s = r | |
52 | 52 | BinaryEntry((q + "-bin"), s) | |
53 | 53 | } | |
54 | 54 | else if ($isInstanceOf(r, "Int")) | |
55 | 55 | then { | |
56 | 56 | let t = r | |
57 | 57 | IntegerEntry((q + "-int"), t) | |
58 | 58 | } | |
59 | 59 | else if ($isInstanceOf(r, "String")) | |
60 | 60 | then { | |
61 | 61 | let u = r | |
62 | 62 | StringEntry((q + "-str"), u) | |
63 | 63 | } | |
64 | 64 | else throw("Match error") | |
65 | 65 | }) | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ([BooleanEntry("bool", h), BinaryEntry("bin", i), IntegerEntry("int", j), StringEntry("str", k)] ++ { | |
69 | 69 | let v = m | |
70 | 70 | let w = size(v) | |
71 | 71 | let x = nil | |
72 | 72 | func y (z,A) = if ((A >= w)) | |
73 | 73 | then z | |
74 | 74 | else n(z, v[A]) | |
75 | 75 | ||
76 | 76 | func B (z,A) = if ((A >= w)) | |
77 | 77 | then z | |
78 | 78 | else throw("List size exceeds 5") | |
79 | 79 | ||
80 | 80 | B(y(y(y(y(y(x, 0), 1), 2), 3), 4), 5) | |
81 | 81 | }) | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 |
github/deemru/w8io/169f3d6 40.03 ms ◑