tx · 7YnD8jHRVxJsLipXh3f7iN3m8drjhEGu2GqbmdqBJCq9 3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB: -0.10000000 Waves 2021.05.20 10:23 [1533688] smart account 3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB > SELF 0.00000000 Waves
{ "type": 13, "id": "7YnD8jHRVxJsLipXh3f7iN3m8drjhEGu2GqbmdqBJCq9", "fee": 10000000, "feeAssetId": null, "timestamp": 1621495450072, "version": 2, "chainId": 84, "sender": "3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB", "senderPublicKey": "AJhgEzWrvQYvLJdZ4bDYWy3W5H1h7UqSPwUyzSKsTYuh", "proofs": [ "Vheu8s4nUkTh4zEekQ8QicT6qTu4NfFe6ibroUrNoDCSfthNxDVCzvTCGyydmuH7ZMm7L8pqyBXSMrytpdzQohY" ], "script": "base64:AAIDAAAAAAAAACEIARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAALAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAJaXNNYW5hZ2VyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEAAAABYQkAAAAAAAACCQEAAAAMdHJ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Wx1ZUludAkBAAAADGdldFZvdGVWYWx1ZQAAAAEFAAAACXZvdGVWYWx1ZQQAAAAJdm90aW5nS2V5CQABLAAAAAIJAAEsAAAAAgIAAAAHbWVtYmVyXwUAAAAQY2FuZGlkYXRlQWRkcmVzcwIAAAANX3ZvdGluZ19zdGF0ZQQAAAALdm90aW5nU3RhdGUJAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQUAAAAJdm90aW5nS2V5BAAAAA5uZXdWb3RpbmdTdGF0ZQkAAGQAAAACBQAAAAt2b3RpbmdTdGF0ZQUAAAAMdm90ZVZhbHVlSW50AwkBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEIBQAAAAFpAAAABmNhbGxlcgMJAQAAAB1pc01lbWJlcnNoaXBWb3RlZEZvckNhbmRpZGF0ZQAAAAIFAAAAEW1lbWJlcnNoaXBBZGRyZXNzBQAAABBjYW5kaWRhdGVBZGRyZXNzCQAAAgAAAAECAAAAFllvdSBoYXZlIGFscmVhZHkgdm90ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACBQAAABFtZW1iZXJzaGlwQWRkcmVzcwIAAAAHX3ZvdGVkXwUAAAAQY2FuZGlkYXRlQWRkcmVzcwAAAAAAAAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAJdm90aW5nS2V5BQAAAA5uZXdWb3RpbmdTdGF0ZQUAAAADbmlsCQAAAgAAAAECAAAAEllvdSBoYXZlIG5vIHJpZ2h0cwAAAABoo0IJ", "height": 1533688, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: EDbQzqyGHXKBgtmbPkaRDZu5VkHpjRoDC8MDEgbR7gf1 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func a (b) = { | |
5 | + | let c = { | |
6 | + | let d = getString(this, b) | |
7 | + | if ($isInstanceOf(d, "String")) | |
8 | + | then { | |
9 | + | let e = d | |
10 | + | e | |
11 | + | } | |
12 | + | else "" | |
13 | + | } | |
14 | + | c | |
15 | + | } | |
16 | + | ||
17 | + | ||
18 | + | func f (g) = (g == this) | |
19 | + | ||
20 | + | ||
21 | + | func h (b) = { | |
22 | + | let c = { | |
23 | + | let d = getInteger(this, b) | |
24 | + | if ($isInstanceOf(d, "Int")) | |
25 | + | then { | |
26 | + | let e = d | |
27 | + | e | |
28 | + | } | |
29 | + | else 0 | |
30 | + | } | |
31 | + | c | |
32 | + | } | |
33 | + | ||
34 | + | ||
35 | + | func i (j) = (a((("membership_" + toString(j)) + "_status")) == "approved") | |
36 | + | ||
37 | + | ||
38 | + | func k (j) = (a((("working_group_" + toString(j)) + "_status")) == "approved") | |
39 | + | ||
40 | + | ||
41 | + | func l (j) = (a((("dao_member_" + toString(j)) + "_status")) == "approved") | |
42 | + | ||
43 | + | ||
44 | + | func m (n,o) = (h(((n + "_voted_") + o)) > 0) | |
45 | + | ||
46 | + | ||
47 | + | func p () = { | |
48 | + | let c = { | |
49 | + | let d = getString(this, "working_group_members") | |
50 | + | if ($isInstanceOf(d, "String")) | |
51 | + | then { | |
52 | + | let e = d | |
53 | + | e | |
54 | + | } | |
55 | + | else "" | |
56 | + | } | |
57 | + | c | |
58 | + | } | |
59 | + | ||
60 | + | ||
61 | + | func q () = { | |
62 | + | let c = { | |
63 | + | let d = getString(this, "dao_members") | |
64 | + | if ($isInstanceOf(d, "String")) | |
65 | + | then { | |
66 | + | let e = d | |
67 | + | e | |
68 | + | } | |
69 | + | else "" | |
70 | + | } | |
71 | + | c | |
72 | + | } | |
73 | + | ||
74 | + | ||
75 | + | func r () = { | |
76 | + | let c = { | |
77 | + | let d = getString(this, "membership_working_group_members") | |
78 | + | if ($isInstanceOf(d, "String")) | |
79 | + | then { | |
80 | + | let e = d | |
81 | + | e | |
82 | + | } | |
83 | + | else "" | |
84 | + | } | |
85 | + | c | |
86 | + | } | |
87 | + | ||
88 | + | ||
89 | + | func s (t) = if ((t == "like")) | |
90 | + | then 1 | |
91 | + | else if ((t == "dislike")) | |
92 | + | then -1 | |
93 | + | else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + t)) | |
94 | + | ||
95 | + | ||
96 | + | @Callable(u) | |
97 | + | func aProposeCandidateForDAOMember (g) = if ((h((("member_" + g) + "_voting_state")) != 0)) | |
98 | + | then throw("This user already exists") | |
99 | + | else { | |
100 | + | let v = q() | |
101 | + | let w = ((v + ";") + g) | |
102 | + | let x = h("dao_members_size") | |
103 | + | let y = (x + 1) | |
104 | + | WriteSet([DataEntry((("dao_member_" + g) + "_status"), "propose"), DataEntry("dao_members", w), DataEntry("dao_members_size", y)]) | |
105 | + | } | |
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | @Callable(u) | |
110 | + | func mRejectDAOMember (g) = if (!(f(u.caller))) | |
111 | + | then throw("access only to the DAO Manager") | |
112 | + | else WriteSet([DataEntry((("dao_member_" + g) + "_status"), "rejected")]) | |
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | @Callable(u) | |
117 | + | func mAddDAOMember (g) = if (!(f(u.caller))) | |
118 | + | then throw("access only to the DAO Manager") | |
119 | + | else { | |
120 | + | let v = q() | |
121 | + | let w = ((v + ";") + g) | |
122 | + | let x = h("dao_members_size") | |
123 | + | let y = (x + 1) | |
124 | + | WriteSet([DataEntry((("dao_member_" + g) + "_status"), "approved"), DataEntry("dao_members", w), DataEntry("dao_members_size", y)]) | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | ||
129 | + | @Callable(u) | |
130 | + | func mAddWorkingGroup (g) = if (!(f(u.caller))) | |
131 | + | then throw("access only to the DAO Manager") | |
132 | + | else { | |
133 | + | let v = p() | |
134 | + | let w = ((v + ";") + g) | |
135 | + | let x = h("working_group_size") | |
136 | + | let y = (x + 1) | |
137 | + | WriteSet([DataEntry((("working_group_member_" + g) + "_status"), "approved"), DataEntry("working_group_members", w), DataEntry("working_group_size", y)]) | |
138 | + | } | |
139 | + | ||
140 | + | ||
141 | + | ||
142 | + | @Callable(u) | |
143 | + | func mAddMembershipWorkingGroup (g) = if (!(f(u.caller))) | |
144 | + | then throw("access only to the DAO Manager") | |
145 | + | else { | |
146 | + | let v = r() | |
147 | + | let w = ((v + ";") + g) | |
148 | + | let x = h("membership_working_group_members_size") | |
149 | + | let y = (x + 1) | |
150 | + | WriteSet([DataEntry((("membership_" + g) + "_status"), "approved"), DataEntry("membership_working_group_members", w), DataEntry("membership_working_group_members_size", y)]) | |
151 | + | } | |
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | @Callable(u) | |
156 | + | func wmgMembershipVoteForDAOMember (o,z) = { | |
157 | + | let n = toString(u.caller) | |
158 | + | let A = s(z) | |
159 | + | let B = (("member_" + o) + "_voting_state") | |
160 | + | let C = h(B) | |
161 | + | let D = (C + A) | |
162 | + | if (i(u.caller)) | |
163 | + | then if (m(n, o)) | |
164 | + | then throw("You have already voted") | |
165 | + | else WriteSet([DataEntry(((n + "_voted_") + o), 1), DataEntry(B, D)]) | |
166 | + | else throw("You have no rights") | |
167 | + | } | |
168 | + | ||
169 | + |
github/deemru/w8io/026f985 23.64 ms ◑