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