tx · CEpHJnA7SLg3RKhYYXeXSoYFEXQ8s7d5TuyoCQpZfV2y 3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT: -0.01000000 Waves 2021.05.20 11:42 [1533769] smart account 3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT > SELF 0.00000000 Waves
{ "type": 13, "id": "CEpHJnA7SLg3RKhYYXeXSoYFEXQ8s7d5TuyoCQpZfV2y", "fee": 1000000, "feeAssetId": null, "timestamp": 1621500185497, "version": 2, "chainId": 84, "sender": "3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT", "senderPublicKey": "5CSJYiEQvEGm3vH52UCQRkmhw7TV5ZzRhWptXi2hjM7T", "proofs": [ "41HDikBnVovFgiMuhuABvHwRFguPgJZoZYrb34DR9NAvbW4BE5PYW9R3QL2JFr4De6dDRT7juiEKATtMoLcFsa7u" ], "script": "base64:AAIDAAAAAAAAACEIARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAAJAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAJaXNNYW5hZ2VyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEAAAABYQkAAAAAAAACCQEA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dGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAEAAAAC3ZvdGluZ1N0YXRlCQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEFAAAACXZvdGluZ0tleQQAAAAObmV3Vm90aW5nU3RhdGUJAABkAAAAAgUAAAALdm90aW5nU3RhdGUFAAAADHZvdGVWYWx1ZUludAMJAQAAABhpc01lbWJlcnNoaXBXb3JraW5nR3JvdXAAAAABCAUAAAABaQAAAAZjYWxsZXIDCQEAAAAdaXNNZW1iZXJzaGlwVm90ZWRGb3JDYW5kaWRhdGUAAAACBQAAABFtZW1iZXJzaGlwQWRkcmVzcwUAAAAQY2FuZGlkYXRlQWRkcmVzcwkAAAIAAAABAgAAABZZb3UgaGF2ZSBhbHJlYWR5IHZvdGVkCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAARbWVtYmVyc2hpcEFkZHJlc3MCAAAAB192b3RlZF8FAAAAEGNhbmRpZGF0ZUFkZHJlc3MAAAAAAAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACXZvdGluZ0tleQUAAAAObmV3Vm90aW5nU3RhdGUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACHZvdGVkS2V5BQAAAAh2b3RlZFZhbAUAAAADbmlsCQAAAgAAAAECAAAAEllvdSBoYXZlIG5vIHJpZ2h0cwAAAAA46qzi", "height": 1533769, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 2F57F9kM2cYbt8CaMkCAyV5X5atCV4agp3NJBJcJs9FH 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, "dao_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 (r) = if ((r == "like")) | |
62 | + | then 1 | |
63 | + | else if ((r == "dislike")) | |
64 | + | then -1 | |
65 | + | else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + r)) | |
66 | + | ||
67 | + | ||
68 | + | @Callable(s) | |
69 | + | func aProposeCandidateForDAOMember (g) = if ((h((("member_" + g) + "_voting_state")) != 0)) | |
70 | + | then throw("This user already exists") | |
71 | + | else { | |
72 | + | let t = p() | |
73 | + | let u = ((t + ";") + g) | |
74 | + | let v = h("dao_members_size") | |
75 | + | let w = (v + 1) | |
76 | + | WriteSet([DataEntry((("dao_member_" + g) + "_status"), "propose"), DataEntry("dao_members", u), DataEntry("dao_members_size", w)]) | |
77 | + | } | |
78 | + | ||
79 | + | ||
80 | + | ||
81 | + | @Callable(s) | |
82 | + | func mRejectDAOMember (g) = if (!(f(s.caller))) | |
83 | + | then throw("access only to the DAO Manager") | |
84 | + | else WriteSet([DataEntry((("dao_member_" + g) + "_status"), "rejected")]) | |
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | @Callable(s) | |
89 | + | func mAddDAOMember (g) = if (!(f(s.caller))) | |
90 | + | then throw("access only to the DAO Manager") | |
91 | + | else { | |
92 | + | let t = p() | |
93 | + | let u = ((t + ";") + g) | |
94 | + | let v = h("dao_members_size") | |
95 | + | let w = (v + 1) | |
96 | + | WriteSet([DataEntry((("dao_member_" + g) + "_status"), "approved"), DataEntry("dao_members", u), DataEntry("dao_members_size", w)]) | |
97 | + | } | |
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | @Callable(s) | |
102 | + | func mAddWorkingGroup (g) = if (!(f(s.caller))) | |
103 | + | then throw("access only to the DAO Manager") | |
104 | + | else { | |
105 | + | let t = { | |
106 | + | let d = getString(this, "dao_wg_members") | |
107 | + | if ($isInstanceOf(d, "String")) | |
108 | + | then { | |
109 | + | let e = d | |
110 | + | e | |
111 | + | } | |
112 | + | else "" | |
113 | + | } | |
114 | + | let u = ((t + ";") + g) | |
115 | + | let v = h("dao_wg_size") | |
116 | + | let w = (v + 1) | |
117 | + | WriteSet([DataEntry((("dao_wg_member_" + g) + "_status"), "approved"), DataEntry("dao_wg_members", u), DataEntry("dao_wg_size", w)]) | |
118 | + | } | |
119 | + | ||
120 | + | ||
121 | + | ||
122 | + | @Callable(s) | |
123 | + | func mAddMembershipWorkingGroup (g) = if (!(f(s.caller))) | |
124 | + | then throw("access only to the DAO Manager") | |
125 | + | else { | |
126 | + | let t = { | |
127 | + | let d = getString(this, "dao_mwg_members") | |
128 | + | if ($isInstanceOf(d, "String")) | |
129 | + | then { | |
130 | + | let e = d | |
131 | + | e | |
132 | + | } | |
133 | + | else "" | |
134 | + | } | |
135 | + | let u = ((t + ";") + g) | |
136 | + | let v = h("dao_mwg_size") | |
137 | + | let w = (v + 1) | |
138 | + | WriteSet([DataEntry((("dao_mwg_" + g) + "_status"), "approved"), DataEntry("dao_mwg_members", u), DataEntry("dao_mwg_size", w)]) | |
139 | + | } | |
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | @Callable(s) | |
144 | + | func wmgMembershipVoteForDAOMember (o,x) = { | |
145 | + | let n = toString(s.caller) | |
146 | + | let y = q(x) | |
147 | + | let z = (("dao_member_" + o) + "_vote") | |
148 | + | let A = (("dao_member_" + o) + "_voted") | |
149 | + | let B = { | |
150 | + | let d = getString(this, A) | |
151 | + | if ($isInstanceOf(d, "String")) | |
152 | + | then { | |
153 | + | let e = d | |
154 | + | e | |
155 | + | } | |
156 | + | else "" | |
157 | + | } | |
158 | + | let C = h(z) | |
159 | + | let D = (C + y) | |
160 | + | if (i(s.caller)) | |
161 | + | then if (m(n, o)) | |
162 | + | then throw("You have already voted") | |
163 | + | else WriteSet([DataEntry(((n + "_voted_") + o), 1), DataEntry(z, D), DataEntry(A, B)]) | |
164 | + | else throw("You have no rights") | |
165 | + | } | |
166 | + | ||
167 | + |
github/deemru/w8io/169f3d6 15.50 ms ◑