tx · 9YHJtRyc9unsyhkpkLr4o2Gk1LpB6CWVhBESJFV5oagG 3MqkoGVxf9wAeNTiksudck7HuNKruh3W9yg: -0.04000000 Waves 2021.08.24 01:28 [1671576] smart account 3MqkoGVxf9wAeNTiksudck7HuNKruh3W9yg > SELF 0.00000000 Waves
{ "type": 13, "id": "9YHJtRyc9unsyhkpkLr4o2Gk1LpB6CWVhBESJFV5oagG", "fee": 4000000, "feeAssetId": null, "timestamp": 1629757722062, "version": 2, "chainId": 84, "sender": "3MqkoGVxf9wAeNTiksudck7HuNKruh3W9yg", "senderPublicKey": "4adRtnahFnRGxzn67XppfF97pKLyUFPtNw5aCZ4NM9UV", "proofs": [ "4iEB4PztpvwfohyM7J6WxzU9Yn6tVrxa1EcWASwR1EUA2RxE9dNSzqJeT5w6dTgTrQaK965SgUjZnt8hJUsZewjd" ], "script": "base64:AAIFAAAAAAAAABgIAhIECgIIGBIDCgEIEgMKAQgSBAoCCAQAAAAHAAAAAAZjb25maWcJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMCAAAABmNvbmZpZwIAAAAAAAAAAAVhZG1pbgMJAQAAAAIhPQAAAAIFAAAABmNvbmZpZwIAAAAACQEAAAALdmFsdWVPckVsc2UAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAZjb25maWcCAAAABWFkbWluAgAAAAACAAAAAAAAAAAFcG9vbHMJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAAAVwb29scwIAAAAWTm8ga2V5IHBvb2xzIHdhcyBmb3VuZAEAAAAHaXNBZG1pbgAAAAEAAAANY2FsbGVyQWRkcmVzcwMJAAAAAAAAAgUAAAANY2FsbGVyQWRkcmVzcwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAFYW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ARQGV4dHJOYXRpdmUoMTA1MykAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAtwb29sQWRkcmVzcwIAAAAIZFRva2VuSWQEAAAAByRtYXRjaDAFAAAAC3Rva2VuQW1vdW50AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAF0CQACWQAAAAEFAAAAB3Rva2VuSWQFAAAAA25pbAkAAAIAAAABAgAAABhJbmNvcnJlY3QgaW52b2tlIHJlc3VsdCEJAAACAAAAAQIAAAAUTm8gcGF5bWVudCBhdHRhY2hlZCEJAAACAAAAAQIAAAAXUG9vbCBhZGRyZXNzIG5vdCBmb3VuZCEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleYSF/gg=", "height": 1671576, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CyCd4HwEBFdFkVe3o1qiU3xJ9mJQTi3hqChsXRdxnZj8 Next: BuvCu3v1C8XbyCp5rKGkgZFTarzwCaZiNZpoNpcSmNTS Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(m) | |
29 | - | func setup (n,c) = if (if ((b != "")) | |
30 | - | then true | |
31 | - | else d(m.caller)) | |
29 | + | func setup (n,c) = if ((b == "")) | |
32 | 30 | then [h("config", n), h("poolsStrg", makeString(c, ";"))] | |
33 | - | else throw("Address does not match with admin address!") | |
31 | + | else if (d(m.caller)) | |
32 | + | then [h("config", n), h("poolsStrg", makeString(c, ";"))] | |
33 | + | else throw("Address does not match with admin address!") | |
34 | 34 | ||
35 | 35 | ||
36 | 36 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = valueOrElse(getStringValue(this, "config"), "") | |
5 | 5 | ||
6 | 6 | let b = if ((a != "")) | |
7 | 7 | then valueOrElse(getStringValue(addressFromStringValue(a), "admin"), "") | |
8 | 8 | else "" | |
9 | 9 | ||
10 | 10 | let c = valueOrErrorMessage(getString(this, "pools"), "No key pools was found") | |
11 | 11 | ||
12 | 12 | func d (e) = if ((e == addressFromStringValue(b))) | |
13 | 13 | then true | |
14 | 14 | else false | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func f (g) = if (contains(c, g)) | |
18 | 18 | then true | |
19 | 19 | else false | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func h (i,j) = StringEntry(i, j) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func k (i,l) = IntegerEntry(i, l) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(m) | |
29 | - | func setup (n,c) = if (if ((b != "")) | |
30 | - | then true | |
31 | - | else d(m.caller)) | |
29 | + | func setup (n,c) = if ((b == "")) | |
32 | 30 | then [h("config", n), h("poolsStrg", makeString(c, ";"))] | |
33 | - | else throw("Address does not match with admin address!") | |
31 | + | else if (d(m.caller)) | |
32 | + | then [h("config", n), h("poolsStrg", makeString(c, ";"))] | |
33 | + | else throw("Address does not match with admin address!") | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Callable(m) | |
38 | 38 | func addPool (o) = if (d(m.caller)) | |
39 | 39 | then { | |
40 | 40 | let p = split(c, ";") | |
41 | 41 | if ((containsElement(p, o) == false)) | |
42 | 42 | then { | |
43 | 43 | let q = (p :+ o) | |
44 | 44 | [h("pools", makeString(q, ";"))] | |
45 | 45 | } | |
46 | 46 | else throw("Pool already exists!") | |
47 | 47 | } | |
48 | 48 | else throw("Address does not match with admin address!") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | ||
52 | 52 | @Callable(m) | |
53 | 53 | func updateConfig (n) = if (d(m.caller)) | |
54 | 54 | then [h("config", n)] | |
55 | 55 | else throw("Address does not match with admin address!") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | ||
59 | 59 | @Callable(m) | |
60 | 60 | func depositAt (o,r) = if (f(o)) | |
61 | 61 | then if ((size(m.payments) > 0)) | |
62 | 62 | then { | |
63 | 63 | let s = toBase58String(m.caller.bytes) | |
64 | 64 | let t = invoke(addressFromStringValue(o), "deposit", [s, r], m.payments) | |
65 | 65 | let u = getStringValue(addressFromStringValue(o), "dTokenId") | |
66 | 66 | let v = t | |
67 | 67 | if ($isInstanceOf(v, "Int")) | |
68 | 68 | then { | |
69 | 69 | let w = v | |
70 | 70 | [ScriptTransfer(m.caller, w, fromBase58String(u))] | |
71 | 71 | } | |
72 | 72 | else throw("Incorrect invoke result!") | |
73 | 73 | } | |
74 | 74 | else throw("No payment attached!") | |
75 | 75 | else throw("Pool address not found!") | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | @Verifier(x) | |
79 | 79 | func y () = sigVerify(x.bodyBytes, x.proofs[0], x.senderPublicKey) | |
80 | 80 |
github/deemru/w8io/169f3d6 100.29 ms ◑