tx · Hdfg5Mn9XTwEYRC5Lwm33iQhi79AAhz9bP86Kc3SPaQ9

3N1iBA7nz6KkAP7RaHtQxU3TC1io912SWBz:  -0.01000000 Waves

2022.04.11 15:07 [2003909] smart account 3N1iBA7nz6KkAP7RaHtQxU3TC1io912SWBz > SELF 0.00000000 Waves

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

github/deemru/w8io/169f3d6 
18.51 ms