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