tx · F842c7KVBcC5ZbSDz6Ko4yzAk9JTKtZQHDXokCMw6qgG

3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB:  -1.03420100 Waves

2021.05.20 11:17 [1533744] smart account 3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB > SELF 0.00000000 Waves

{ "type": 13, "id": "F842c7KVBcC5ZbSDz6Ko4yzAk9JTKtZQHDXokCMw6qgG", "fee": 103420100, "feeAssetId": null, "timestamp": 1621498639569, "version": 2, "chainId": 84, "sender": "3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB", "senderPublicKey": "AJhgEzWrvQYvLJdZ4bDYWy3W5H1h7UqSPwUyzSKsTYuh", "proofs": [ "4izK7aicxb89epvQAoTyBR3L5Gk7jyUErgC7rUifLBrUdApcWmc87g6bUZBderBWhmyEVpp3twRimGjFpUmx6YKb" ], "script": "base64:AAIDAAAAAAAAACEIARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAAKAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAJaXNNYW5hZ2VyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEAAAABYQkAAAAAAAACCQEAAAAMdHJ5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original | compacted Prev: EDbQzqyGHXKBgtmbPkaRDZu5VkHpjRoDC8MDEgbR7gf1 Next: 4y8mgbkhuMgVNkCJ8VnMzgoNS4Zw4x3LgwVHzPsR8XzM Diff:
OldNewDifferences
4646
4747 func p () = {
4848 let c = {
49- let d = getString(this, "working_group_members")
49+ let d = getString(this, "dao_members")
5050 if ($isInstanceOf(d, "String"))
5151 then {
5252 let e = d
6060
6161 func q () = {
6262 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 = {
7763 let d = getString(this, "membership_working_group_members")
7864 if ($isInstanceOf(d, "String"))
7965 then {
8672 }
8773
8874
89-func s (t) = if ((t == "like"))
75+func r (s) = if ((s == "like"))
9076 then 1
91- else if ((t == "dislike"))
77+ else if ((s == "dislike"))
9278 then -1
93- else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + t))
79+ else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + s))
9480
9581
96-@Callable(u)
82+@Callable(t)
9783 func aProposeCandidateForDAOMember (g) = if ((h((("member_" + g) + "_voting_state")) != 0))
9884 then throw("This user already exists")
9985 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)])
86+ let u = p()
87+ let v = ((u + ";") + g)
88+ let w = h("dao_members_size")
89+ let x = (w + 1)
90+ WriteSet([DataEntry((("dao_member_" + g) + "_status"), "propose"), DataEntry("dao_members", v), DataEntry("dao_members_size", x)])
10591 }
10692
10793
10894
109-@Callable(u)
110-func mRejectDAOMember (g) = if (!(f(u.caller)))
95+@Callable(t)
96+func mRejectDAOMember (g) = if (!(f(t.caller)))
11197 then throw("access only to the DAO Manager")
11298 else WriteSet([DataEntry((("dao_member_" + g) + "_status"), "rejected")])
11399
114100
115101
116-@Callable(u)
117-func mAddDAOMember (g) = if (!(f(u.caller)))
102+@Callable(t)
103+func mAddDAOMember (g) = if (!(f(t.caller)))
118104 then throw("access only to the DAO Manager")
119105 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)])
106+ let u = p()
107+ let v = ((u + ";") + g)
108+ let w = h("dao_members_size")
109+ let x = (w + 1)
110+ WriteSet([DataEntry((("dao_member_" + g) + "_status"), "approved"), DataEntry("dao_members", v), DataEntry("dao_members_size", x)])
125111 }
126112
127113
128114
129-@Callable(u)
130-func mAddWorkingGroup (g) = if (!(f(u.caller)))
115+@Callable(t)
116+func mAddWorkingGroup (g) = if (!(f(t.caller)))
131117 then throw("access only to the DAO Manager")
132118 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)])
119+ let u = {
120+ let d = getString(this, "dao_wg_members")
121+ if ($isInstanceOf(d, "String"))
122+ then {
123+ let e = d
124+ e
125+ }
126+ else ""
127+ }
128+ let v = ((u + ";") + g)
129+ let w = h("dao_wg_size")
130+ let x = (w + 1)
131+ WriteSet([DataEntry((("dao_wg_" + g) + "_status"), "approved"), DataEntry("dao_wg_members", v), DataEntry("dao_wg_size", x)])
138132 }
139133
140134
141135
142-@Callable(u)
143-func mAddMembershipWorkingGroup (g) = if (!(f(u.caller)))
136+@Callable(t)
137+func mAddMembershipWorkingGroup (g) = if (!(f(t.caller)))
144138 then throw("access only to the DAO Manager")
145139 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)])
140+ let u = q()
141+ let v = ((u + ";") + g)
142+ let w = h("membership_working_group_members_size")
143+ let x = (w + 1)
144+ WriteSet([DataEntry((("membership_" + g) + "_status"), "approved"), DataEntry("membership_working_group_members", v), DataEntry("membership_working_group_members_size", x)])
151145 }
152146
153147
154148
155-@Callable(u)
156-func wmgMembershipVoteForDAOMember (o,z) = {
157- let n = toString(u.caller)
158- let A = s(z)
159- let B = (("dao_member_" + o) + "_vote")
160- let C = (("dao_member_" + o) + "_voted")
161- let D = {
162- let d = getString(this, C)
149+@Callable(t)
150+func wmgMembershipVoteForDAOMember (o,y) = {
151+ let n = toString(t.caller)
152+ let z = r(y)
153+ let A = (("dao_member_" + o) + "_vote")
154+ let B = (("dao_member_" + o) + "_voted")
155+ let C = {
156+ let d = getString(this, B)
163157 if ($isInstanceOf(d, "String"))
164158 then {
165159 let e = d
167161 }
168162 else ""
169163 }
170- let E = h(B)
171- let F = (E + A)
172- if (i(u.caller))
164+ let D = h(A)
165+ let E = (D + z)
166+ if (i(t.caller))
173167 then if (m(n, o))
174168 then throw("You have already voted")
175- else WriteSet([DataEntry(((n + "_voted_") + o), 1), DataEntry(B, F), DataEntry(C, D)])
169+ else WriteSet([DataEntry(((n + "_voted_") + o), 1), DataEntry(A, E), DataEntry(B, C)])
176170 else throw("You have no rights")
177171 }
178172
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = {
55 let c = {
66 let d = getString(this, b)
77 if ($isInstanceOf(d, "String"))
88 then {
99 let e = d
1010 e
1111 }
1212 else ""
1313 }
1414 c
1515 }
1616
1717
1818 func f (g) = (g == this)
1919
2020
2121 func h (b) = {
2222 let c = {
2323 let d = getInteger(this, b)
2424 if ($isInstanceOf(d, "Int"))
2525 then {
2626 let e = d
2727 e
2828 }
2929 else 0
3030 }
3131 c
3232 }
3333
3434
3535 func i (j) = (a((("membership_" + toString(j)) + "_status")) == "approved")
3636
3737
3838 func k (j) = (a((("working_group_" + toString(j)) + "_status")) == "approved")
3939
4040
4141 func l (j) = (a((("dao_member_" + toString(j)) + "_status")) == "approved")
4242
4343
4444 func m (n,o) = (h(((n + "_voted_") + o)) > 0)
4545
4646
4747 func p () = {
4848 let c = {
49- let d = getString(this, "working_group_members")
49+ let d = getString(this, "dao_members")
5050 if ($isInstanceOf(d, "String"))
5151 then {
5252 let e = d
5353 e
5454 }
5555 else ""
5656 }
5757 c
5858 }
5959
6060
6161 func q () = {
6262 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 = {
7763 let d = getString(this, "membership_working_group_members")
7864 if ($isInstanceOf(d, "String"))
7965 then {
8066 let e = d
8167 e
8268 }
8369 else ""
8470 }
8571 c
8672 }
8773
8874
89-func s (t) = if ((t == "like"))
75+func r (s) = if ((s == "like"))
9076 then 1
91- else if ((t == "dislike"))
77+ else if ((s == "dislike"))
9278 then -1
93- else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + t))
79+ else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + s))
9480
9581
96-@Callable(u)
82+@Callable(t)
9783 func aProposeCandidateForDAOMember (g) = if ((h((("member_" + g) + "_voting_state")) != 0))
9884 then throw("This user already exists")
9985 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)])
86+ let u = p()
87+ let v = ((u + ";") + g)
88+ let w = h("dao_members_size")
89+ let x = (w + 1)
90+ WriteSet([DataEntry((("dao_member_" + g) + "_status"), "propose"), DataEntry("dao_members", v), DataEntry("dao_members_size", x)])
10591 }
10692
10793
10894
109-@Callable(u)
110-func mRejectDAOMember (g) = if (!(f(u.caller)))
95+@Callable(t)
96+func mRejectDAOMember (g) = if (!(f(t.caller)))
11197 then throw("access only to the DAO Manager")
11298 else WriteSet([DataEntry((("dao_member_" + g) + "_status"), "rejected")])
11399
114100
115101
116-@Callable(u)
117-func mAddDAOMember (g) = if (!(f(u.caller)))
102+@Callable(t)
103+func mAddDAOMember (g) = if (!(f(t.caller)))
118104 then throw("access only to the DAO Manager")
119105 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)])
106+ let u = p()
107+ let v = ((u + ";") + g)
108+ let w = h("dao_members_size")
109+ let x = (w + 1)
110+ WriteSet([DataEntry((("dao_member_" + g) + "_status"), "approved"), DataEntry("dao_members", v), DataEntry("dao_members_size", x)])
125111 }
126112
127113
128114
129-@Callable(u)
130-func mAddWorkingGroup (g) = if (!(f(u.caller)))
115+@Callable(t)
116+func mAddWorkingGroup (g) = if (!(f(t.caller)))
131117 then throw("access only to the DAO Manager")
132118 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)])
119+ let u = {
120+ let d = getString(this, "dao_wg_members")
121+ if ($isInstanceOf(d, "String"))
122+ then {
123+ let e = d
124+ e
125+ }
126+ else ""
127+ }
128+ let v = ((u + ";") + g)
129+ let w = h("dao_wg_size")
130+ let x = (w + 1)
131+ WriteSet([DataEntry((("dao_wg_" + g) + "_status"), "approved"), DataEntry("dao_wg_members", v), DataEntry("dao_wg_size", x)])
138132 }
139133
140134
141135
142-@Callable(u)
143-func mAddMembershipWorkingGroup (g) = if (!(f(u.caller)))
136+@Callable(t)
137+func mAddMembershipWorkingGroup (g) = if (!(f(t.caller)))
144138 then throw("access only to the DAO Manager")
145139 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)])
140+ let u = q()
141+ let v = ((u + ";") + g)
142+ let w = h("membership_working_group_members_size")
143+ let x = (w + 1)
144+ WriteSet([DataEntry((("membership_" + g) + "_status"), "approved"), DataEntry("membership_working_group_members", v), DataEntry("membership_working_group_members_size", x)])
151145 }
152146
153147
154148
155-@Callable(u)
156-func wmgMembershipVoteForDAOMember (o,z) = {
157- let n = toString(u.caller)
158- let A = s(z)
159- let B = (("dao_member_" + o) + "_vote")
160- let C = (("dao_member_" + o) + "_voted")
161- let D = {
162- let d = getString(this, C)
149+@Callable(t)
150+func wmgMembershipVoteForDAOMember (o,y) = {
151+ let n = toString(t.caller)
152+ let z = r(y)
153+ let A = (("dao_member_" + o) + "_vote")
154+ let B = (("dao_member_" + o) + "_voted")
155+ let C = {
156+ let d = getString(this, B)
163157 if ($isInstanceOf(d, "String"))
164158 then {
165159 let e = d
166160 e
167161 }
168162 else ""
169163 }
170- let E = h(B)
171- let F = (E + A)
172- if (i(u.caller))
164+ let D = h(A)
165+ let E = (D + z)
166+ if (i(t.caller))
173167 then if (m(n, o))
174168 then throw("You have already voted")
175- else WriteSet([DataEntry(((n + "_voted_") + o), 1), DataEntry(B, F), DataEntry(C, D)])
169+ else WriteSet([DataEntry(((n + "_voted_") + o), 1), DataEntry(A, E), DataEntry(B, C)])
176170 else throw("You have no rights")
177171 }
178172
179173

github/deemru/w8io/026f985 
60.11 ms