tx · 3Vczk9k5BYTDuyMTMvwkxEu2p5BXdTavJ1FoUaKU2VHk

3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT:  -0.01600000 Waves

2021.05.20 14:18 [1533932] smart account 3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT > SELF 0.00000000 Waves

{ "type": 13, "id": "3Vczk9k5BYTDuyMTMvwkxEu2p5BXdTavJ1FoUaKU2VHk", "fee": 1600000, "feeAssetId": null, "timestamp": 1621509507573, "version": 2, "chainId": 84, "sender": "3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT", "senderPublicKey": "5CSJYiEQvEGm3vH52UCQRkmhw7TV5ZzRhWptXi2hjM7T", "proofs": [ "3WF2mT25YVKhPLNM3Ve5sTcRNsPhLZ23KbNGVzmjzXWs5tpAjmhXqyzx8HUnbj5qrxSkbaPeyUNZUPAFyEaPDHAT" ], "script": "base64:AAIDAAAAAAAAACEIARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAAHAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAJaXNNYW5hZ2VyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADmlzV29ya2luZ0dyb3VwAAAAAQAAAAFhCQAAAAAAAAIJAQAAAA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uZXdWb3RpbmdTdGF0ZQkAAGQAAAACBQAAAAt2b3RpbmdTdGF0ZQUAAAAMdm90ZVZhbHVlSW50BAAAAAxtd2dTdGF0dXNWYWwJAQAAAAx0cnlHZXRTdHJpbmcAAAABCQABLAAAAAIJAAEsAAAAAgIAAAAPZGFvX213Z19tZW1iZXJfBQAAAAZjYWxsZXICAAAAB19zdGF0dXMDCQAAAAAAAAIFAAAADG13Z1N0YXR1c1ZhbAIAAAAIYXBwcm92ZWQDCQAAZgAAAAIJAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAALZGFvX21lbWJlcl8FAAAAEGNhbmRpZGF0ZUFkZHJlc3MCAAAAB192b3Rlc18FAAAABmNhbGxlcgAAAAAAAAAAAAkAAAIAAAABCQABLAAAAAICAAAAH1lvdSBoYXZlIGFscmVhZHkgdm90ZWQuIENhbGxlciAFAAAABmNhbGxlcgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAJdm90aW5nS2V5BQAAAA5uZXdWb3RpbmdTdGF0ZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAIdm90ZWRLZXkFAAAAC25ld1ZvdGVkVmFsCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAh2b3Rlc0tleQUAAAAMdm90ZVZhbHVlSW50BQAAAANuaWwJAAACAAAAAQkAASwAAAACAgAAABtZb3UgaGF2ZSBubyByaWdodHMuIENhbGxlciAFAAAABmNhbGxlcgAAAACnqGtt", "height": 1533932, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Qi6YjdcN5N9KcyLFrL2wXvGrTmR5wczeWNH2e1BhcT7 Next: 45wYiWKPL6oEZ4bkbGpGGM5VuAwxqJPAJ9nJeNqCQK2Y Diff:
OldNewDifferences
3838 func k (j) = (a((("dao_member_" + toString(j)) + "_status")) == "approved")
3939
4040
41-func l (m,n) = (h(((m + "_voted_") + n)) > 0)
42-
43-
44-func o () = {
41+func l () = {
4542 let c = {
4643 let d = getString(this, "dao_members")
4744 if ($isInstanceOf(d, "String"))
5552 }
5653
5754
58-func p (q) = if ((q == "like"))
55+func m (n) = if ((n == "like"))
5956 then 1
60- else if ((q == "dislike"))
57+ else if ((n == "dislike"))
6158 then -1
62- else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + q))
59+ else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + n))
6360
6461
65-@Callable(r)
62+@Callable(o)
6663 func aProposeCandidateForDAOMember (g) = if ((h((("member_" + g) + "_voting_state")) != 0))
6764 then throw("This user already exists")
6865 else {
69- let s = o()
70- let t = ((s + ";") + g)
71- let u = h("dao_members_size")
72- let v = (u + 1)
73- WriteSet([DataEntry((("dao_member_" + g) + "_status"), "propose"), DataEntry("dao_members", t), DataEntry("dao_members_size", v)])
66+ let p = l()
67+ let q = ((p + ";") + g)
68+ let r = h("dao_members_size")
69+ let s = (r + 1)
70+ WriteSet([DataEntry((("dao_member_" + g) + "_status"), "propose"), DataEntry("dao_members", q), DataEntry("dao_members_size", s)])
7471 }
7572
7673
7774
78-@Callable(r)
79-func mRejectDAOMember (g) = if (!(f(r.caller)))
75+@Callable(o)
76+func mRejectDAOMember (g) = if (!(f(o.caller)))
8077 then throw("access only to the DAO Manager")
8178 else WriteSet([DataEntry((("dao_member_" + g) + "_status"), "rejected")])
8279
8380
8481
85-@Callable(r)
86-func mAddDAOMember (g) = if (!(f(r.caller)))
82+@Callable(o)
83+func mAddDAOMember (g) = if (!(f(o.caller)))
8784 then throw("access only to the DAO Manager")
8885 else {
89- let s = o()
90- let t = ((s + ";") + g)
91- let u = h("dao_members_size")
92- let v = (u + 1)
93- WriteSet([DataEntry((("dao_member_" + g) + "_status"), "approved"), DataEntry("dao_members", t), DataEntry("dao_members_size", v)])
86+ let p = l()
87+ let q = ((p + ";") + g)
88+ let r = h("dao_members_size")
89+ let s = (r + 1)
90+ WriteSet([DataEntry((("dao_member_" + g) + "_status"), "approved"), DataEntry("dao_members", q), DataEntry("dao_members_size", s)])
9491 }
9592
9693
9794
98-@Callable(r)
99-func mAddWorkingGroup (g) = if (!(f(r.caller)))
95+@Callable(o)
96+func mAddWorkingGroup (g) = if (!(f(o.caller)))
10097 then throw("access only to the DAO Manager")
10198 else {
102- let s = {
99+ let p = {
103100 let d = getString(this, "dao_wg_members")
104101 if ($isInstanceOf(d, "String"))
105102 then {
108105 }
109106 else ""
110107 }
111- let t = ((s + ";") + g)
112- let u = h("dao_wg_size")
113- let v = (u + 1)
114- WriteSet([DataEntry((("dao_wg_member_" + g) + "_status"), "approved"), DataEntry("dao_wg_members", t), DataEntry("dao_wg_size", v)])
108+ let q = ((p + ";") + g)
109+ let r = h("dao_wg_size")
110+ let s = (r + 1)
111+ WriteSet([DataEntry((("dao_wg_member_" + g) + "_status"), "approved"), DataEntry("dao_wg_members", q), DataEntry("dao_wg_size", s)])
115112 }
116113
117114
118115
119-@Callable(r)
120-func mAddMembershipWorkingGroup (g) = if (!(f(r.caller)))
116+@Callable(o)
117+func mAddMembershipWorkingGroup (g) = if (!(f(o.caller)))
121118 then throw("access only to the DAO Manager")
122119 else {
123- let s = {
120+ let p = {
124121 let d = getString(this, "dao_mwg_members")
125122 if ($isInstanceOf(d, "String"))
126123 then {
129126 }
130127 else ""
131128 }
132- let t = ((s + ";") + g)
133- let u = h("dao_mwg_size")
134- let v = (u + 1)
135- WriteSet([DataEntry((("dao_mwg_member_" + g) + "_status"), "approved"), DataEntry("dao_mwg_members", t), DataEntry("dao_mwg_size", v)])
129+ let q = ((p + ";") + g)
130+ let r = h("dao_mwg_size")
131+ let s = (r + 1)
132+ WriteSet([DataEntry((("dao_mwg_member_" + g) + "_status"), "approved"), DataEntry("dao_mwg_members", q), DataEntry("dao_mwg_size", s)])
136133 }
137134
138135
139136
140-@Callable(r)
141-func wmgMembershipVoteForDAOMember (n,w) = {
142- let x = toString(r.caller)
143- let m = toString(r.caller)
144- let y = p(w)
145- let z = (("dao_member_" + n) + "_vote")
146- let A = (("dao_member_" + n) + "_voted")
137+@Callable(o)
138+func wmgMembershipVoteForDAOMember (t,u) = {
139+ let v = toString(o.caller)
140+ let w = toString(o.caller)
141+ let x = m(u)
142+ let y = (("dao_member_" + t) + "_vote")
143+ let z = (("dao_member_" + t) + "_voted")
144+ let A = ((("dao_member_" + t) + "_votes_") + v)
147145 let B = {
148- let d = getString(this, A)
146+ let d = getString(this, z)
149147 if ($isInstanceOf(d, "String"))
150148 then {
151149 let e = d
153151 }
154152 else ""
155153 }
156- let C = ((x + ";") + B)
157- let D = h(z)
158- let E = (D + y)
159- let F = a((("dao_mwg_member_" + x) + "_status"))
154+ let C = ((v + ";") + B)
155+ let D = h(y)
156+ let E = (D + x)
157+ let F = a((("dao_mwg_member_" + v) + "_status"))
160158 if ((F == "approved"))
161- then if (l(m, n))
162- then throw(("You have already voted. Caller " + x))
163- else WriteSet([DataEntry(((m + "_voted_") + n), 1), DataEntry(z, E), DataEntry(A, C)])
164- else throw(("You have no rights. Caller " + x))
159+ then if ((h(((("dao_member_" + t) + "_votes_") + v)) > 0))
160+ then throw(("You have already voted. Caller " + v))
161+ else WriteSet([DataEntry(y, E), DataEntry(z, C), DataEntry(A, x)])
162+ else throw(("You have no rights. Caller " + v))
165163 }
166164
167165
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((("working_group_" + toString(j)) + "_status")) == "approved")
3636
3737
3838 func k (j) = (a((("dao_member_" + toString(j)) + "_status")) == "approved")
3939
4040
41-func l (m,n) = (h(((m + "_voted_") + n)) > 0)
42-
43-
44-func o () = {
41+func l () = {
4542 let c = {
4643 let d = getString(this, "dao_members")
4744 if ($isInstanceOf(d, "String"))
4845 then {
4946 let e = d
5047 e
5148 }
5249 else ""
5350 }
5451 c
5552 }
5653
5754
58-func p (q) = if ((q == "like"))
55+func m (n) = if ((n == "like"))
5956 then 1
60- else if ((q == "dislike"))
57+ else if ((n == "dislike"))
6158 then -1
62- else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + q))
59+ else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + n))
6360
6461
65-@Callable(r)
62+@Callable(o)
6663 func aProposeCandidateForDAOMember (g) = if ((h((("member_" + g) + "_voting_state")) != 0))
6764 then throw("This user already exists")
6865 else {
69- let s = o()
70- let t = ((s + ";") + g)
71- let u = h("dao_members_size")
72- let v = (u + 1)
73- WriteSet([DataEntry((("dao_member_" + g) + "_status"), "propose"), DataEntry("dao_members", t), DataEntry("dao_members_size", v)])
66+ let p = l()
67+ let q = ((p + ";") + g)
68+ let r = h("dao_members_size")
69+ let s = (r + 1)
70+ WriteSet([DataEntry((("dao_member_" + g) + "_status"), "propose"), DataEntry("dao_members", q), DataEntry("dao_members_size", s)])
7471 }
7572
7673
7774
78-@Callable(r)
79-func mRejectDAOMember (g) = if (!(f(r.caller)))
75+@Callable(o)
76+func mRejectDAOMember (g) = if (!(f(o.caller)))
8077 then throw("access only to the DAO Manager")
8178 else WriteSet([DataEntry((("dao_member_" + g) + "_status"), "rejected")])
8279
8380
8481
85-@Callable(r)
86-func mAddDAOMember (g) = if (!(f(r.caller)))
82+@Callable(o)
83+func mAddDAOMember (g) = if (!(f(o.caller)))
8784 then throw("access only to the DAO Manager")
8885 else {
89- let s = o()
90- let t = ((s + ";") + g)
91- let u = h("dao_members_size")
92- let v = (u + 1)
93- WriteSet([DataEntry((("dao_member_" + g) + "_status"), "approved"), DataEntry("dao_members", t), DataEntry("dao_members_size", v)])
86+ let p = l()
87+ let q = ((p + ";") + g)
88+ let r = h("dao_members_size")
89+ let s = (r + 1)
90+ WriteSet([DataEntry((("dao_member_" + g) + "_status"), "approved"), DataEntry("dao_members", q), DataEntry("dao_members_size", s)])
9491 }
9592
9693
9794
98-@Callable(r)
99-func mAddWorkingGroup (g) = if (!(f(r.caller)))
95+@Callable(o)
96+func mAddWorkingGroup (g) = if (!(f(o.caller)))
10097 then throw("access only to the DAO Manager")
10198 else {
102- let s = {
99+ let p = {
103100 let d = getString(this, "dao_wg_members")
104101 if ($isInstanceOf(d, "String"))
105102 then {
106103 let e = d
107104 e
108105 }
109106 else ""
110107 }
111- let t = ((s + ";") + g)
112- let u = h("dao_wg_size")
113- let v = (u + 1)
114- WriteSet([DataEntry((("dao_wg_member_" + g) + "_status"), "approved"), DataEntry("dao_wg_members", t), DataEntry("dao_wg_size", v)])
108+ let q = ((p + ";") + g)
109+ let r = h("dao_wg_size")
110+ let s = (r + 1)
111+ WriteSet([DataEntry((("dao_wg_member_" + g) + "_status"), "approved"), DataEntry("dao_wg_members", q), DataEntry("dao_wg_size", s)])
115112 }
116113
117114
118115
119-@Callable(r)
120-func mAddMembershipWorkingGroup (g) = if (!(f(r.caller)))
116+@Callable(o)
117+func mAddMembershipWorkingGroup (g) = if (!(f(o.caller)))
121118 then throw("access only to the DAO Manager")
122119 else {
123- let s = {
120+ let p = {
124121 let d = getString(this, "dao_mwg_members")
125122 if ($isInstanceOf(d, "String"))
126123 then {
127124 let e = d
128125 e
129126 }
130127 else ""
131128 }
132- let t = ((s + ";") + g)
133- let u = h("dao_mwg_size")
134- let v = (u + 1)
135- WriteSet([DataEntry((("dao_mwg_member_" + g) + "_status"), "approved"), DataEntry("dao_mwg_members", t), DataEntry("dao_mwg_size", v)])
129+ let q = ((p + ";") + g)
130+ let r = h("dao_mwg_size")
131+ let s = (r + 1)
132+ WriteSet([DataEntry((("dao_mwg_member_" + g) + "_status"), "approved"), DataEntry("dao_mwg_members", q), DataEntry("dao_mwg_size", s)])
136133 }
137134
138135
139136
140-@Callable(r)
141-func wmgMembershipVoteForDAOMember (n,w) = {
142- let x = toString(r.caller)
143- let m = toString(r.caller)
144- let y = p(w)
145- let z = (("dao_member_" + n) + "_vote")
146- let A = (("dao_member_" + n) + "_voted")
137+@Callable(o)
138+func wmgMembershipVoteForDAOMember (t,u) = {
139+ let v = toString(o.caller)
140+ let w = toString(o.caller)
141+ let x = m(u)
142+ let y = (("dao_member_" + t) + "_vote")
143+ let z = (("dao_member_" + t) + "_voted")
144+ let A = ((("dao_member_" + t) + "_votes_") + v)
147145 let B = {
148- let d = getString(this, A)
146+ let d = getString(this, z)
149147 if ($isInstanceOf(d, "String"))
150148 then {
151149 let e = d
152150 e
153151 }
154152 else ""
155153 }
156- let C = ((x + ";") + B)
157- let D = h(z)
158- let E = (D + y)
159- let F = a((("dao_mwg_member_" + x) + "_status"))
154+ let C = ((v + ";") + B)
155+ let D = h(y)
156+ let E = (D + x)
157+ let F = a((("dao_mwg_member_" + v) + "_status"))
160158 if ((F == "approved"))
161- then if (l(m, n))
162- then throw(("You have already voted. Caller " + x))
163- else WriteSet([DataEntry(((m + "_voted_") + n), 1), DataEntry(z, E), DataEntry(A, C)])
164- else throw(("You have no rights. Caller " + x))
159+ then if ((h(((("dao_member_" + t) + "_votes_") + v)) > 0))
160+ then throw(("You have already voted. Caller " + v))
161+ else WriteSet([DataEntry(y, E), DataEntry(z, C), DataEntry(A, x)])
162+ else throw(("You have no rights. Caller " + v))
165163 }
166164
167165

github/deemru/w8io/169f3d6 
45.22 ms