tx · 4y8mgbkhuMgVNkCJ8VnMzgoNS4Zw4x3LgwVHzPsR8XzM

3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB:  -0.10650000 Waves

2021.05.20 11:19 [1533746] smart account 3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB > SELF 0.00000000 Waves

{ "type": 13, "id": "4y8mgbkhuMgVNkCJ8VnMzgoNS4Zw4x3LgwVHzPsR8XzM", "fee": 10650000, "feeAssetId": null, "timestamp": 1621498770511, "version": 2, "chainId": 84, "sender": "3MvRNiiunRy51KJXcLmZhUzrm9fXfMcapuB", "senderPublicKey": "AJhgEzWrvQYvLJdZ4bDYWy3W5H1h7UqSPwUyzSKsTYuh", "proofs": [ "EnH1KrUKzTpoXehXrJ7ZiDDFoXv6dq9cdbhFWEB3nkZZZBVMXTaZA8sU3sSPpusrryG1DtmrBEgBjuc6K2yQzHh" ], "script": "base64:AAIDAAAAAAAAACEIARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAAKAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAJaXNNYW5hZ2VyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEAAAABYQkAAAAA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==", "height": 1533746, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F842c7KVBcC5ZbSDz6Ko4yzAk9JTKtZQHDXokCMw6qgG Next: 9GNz3y9KeuLoGBkxksr8kqkUbuw9ESoMgGH6fLKxcg7n Diff:
OldNewDifferences
113113 let newGroup = ((group + ";") + address)
114114 let groupSize = tryGetInteger("dao_wg_size")
115115 let newGroupSize = (groupSize + 1)
116- WriteSet([DataEntry((("dao_wg_" + address) + "_status"), "approved"), DataEntry("dao_wg_members", newGroup), DataEntry("dao_wg_size", newGroupSize)])
116+ WriteSet([DataEntry((("dao_wg_member_" + address) + "_status"), "approved"), DataEntry("dao_wg_members", newGroup), DataEntry("dao_wg_size", newGroupSize)])
117117 }
118118
119119
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func tryGetString (key) = {
55 let val = match getString(this, key) {
66 case b: String =>
77 b
88 case _ =>
99 ""
1010 }
1111 val
1212 }
1313
1414
1515 func isManager (address) = (address == this)
1616
1717
1818 func tryGetInteger (key) = {
1919 let val = match getInteger(this, key) {
2020 case b: Int =>
2121 b
2222 case _ =>
2323 0
2424 }
2525 val
2626 }
2727
2828
2929 func isMembershipWorkingGroup (a) = (tryGetString((("membership_" + toString(a)) + "_status")) == "approved")
3030
3131
3232 func isWorkingGroup (a) = (tryGetString((("working_group_" + toString(a)) + "_status")) == "approved")
3333
3434
3535 func isDAOMember (a) = (tryGetString((("dao_member_" + toString(a)) + "_status")) == "approved")
3636
3737
3838 func isMembershipVotedForCandidate (membershipAddress,candidateAddress) = (tryGetInteger(((membershipAddress + "_voted_") + candidateAddress)) > 0)
3939
4040
4141 func getDAOMember () = {
4242 let val = match getString(this, "dao_members") {
4343 case b: String =>
4444 b
4545 case _ =>
4646 ""
4747 }
4848 val
4949 }
5050
5151
5252 func getMembershipWorkingGroup () = {
5353 let val = match getString(this, "membership_working_group_members") {
5454 case b: String =>
5555 b
5656 case _ =>
5757 ""
5858 }
5959 val
6060 }
6161
6262
6363 func getVoteValue (s) = if ((s == "like"))
6464 then 1
6565 else if ((s == "dislike"))
6666 then -1
6767 else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + s))
6868
6969
7070 @Callable(i)
7171 func aProposeCandidateForDAOMember (address) = if ((tryGetInteger((("member_" + address) + "_voting_state")) != 0))
7272 then throw("This user already exists")
7373 else {
7474 let group = getDAOMember()
7575 let newGroup = ((group + ";") + address)
7676 let groupSize = tryGetInteger("dao_members_size")
7777 let newGroupSize = (groupSize + 1)
7878 WriteSet([DataEntry((("dao_member_" + address) + "_status"), "propose"), DataEntry("dao_members", newGroup), DataEntry("dao_members_size", newGroupSize)])
7979 }
8080
8181
8282
8383 @Callable(i)
8484 func mRejectDAOMember (address) = if (!(isManager(i.caller)))
8585 then throw("access only to the DAO Manager")
8686 else WriteSet([DataEntry((("dao_member_" + address) + "_status"), "rejected")])
8787
8888
8989
9090 @Callable(i)
9191 func mAddDAOMember (address) = if (!(isManager(i.caller)))
9292 then throw("access only to the DAO Manager")
9393 else {
9494 let group = getDAOMember()
9595 let newGroup = ((group + ";") + address)
9696 let groupSize = tryGetInteger("dao_members_size")
9797 let newGroupSize = (groupSize + 1)
9898 WriteSet([DataEntry((("dao_member_" + address) + "_status"), "approved"), DataEntry("dao_members", newGroup), DataEntry("dao_members_size", newGroupSize)])
9999 }
100100
101101
102102
103103 @Callable(i)
104104 func mAddWorkingGroup (address) = if (!(isManager(i.caller)))
105105 then throw("access only to the DAO Manager")
106106 else {
107107 let group = match getString(this, "dao_wg_members") {
108108 case b: String =>
109109 b
110110 case _ =>
111111 ""
112112 }
113113 let newGroup = ((group + ";") + address)
114114 let groupSize = tryGetInteger("dao_wg_size")
115115 let newGroupSize = (groupSize + 1)
116- WriteSet([DataEntry((("dao_wg_" + address) + "_status"), "approved"), DataEntry("dao_wg_members", newGroup), DataEntry("dao_wg_size", newGroupSize)])
116+ WriteSet([DataEntry((("dao_wg_member_" + address) + "_status"), "approved"), DataEntry("dao_wg_members", newGroup), DataEntry("dao_wg_size", newGroupSize)])
117117 }
118118
119119
120120
121121 @Callable(i)
122122 func mAddMembershipWorkingGroup (address) = if (!(isManager(i.caller)))
123123 then throw("access only to the DAO Manager")
124124 else {
125125 let group = getMembershipWorkingGroup()
126126 let newGroup = ((group + ";") + address)
127127 let groupSize = tryGetInteger("membership_working_group_members_size")
128128 let newGroupSize = (groupSize + 1)
129129 WriteSet([DataEntry((("membership_" + address) + "_status"), "approved"), DataEntry("membership_working_group_members", newGroup), DataEntry("membership_working_group_members_size", newGroupSize)])
130130 }
131131
132132
133133
134134 @Callable(i)
135135 func wmgMembershipVoteForDAOMember (candidateAddress,voteValue) = {
136136 let membershipAddress = toString(i.caller)
137137 let voteValueInt = getVoteValue(voteValue)
138138 let votingKey = (("dao_member_" + candidateAddress) + "_vote")
139139 let votedKey = (("dao_member_" + candidateAddress) + "_voted")
140140 let votedVal = match getString(this, votedKey) {
141141 case b: String =>
142142 b
143143 case _ =>
144144 ""
145145 }
146146 let votingState = tryGetInteger(votingKey)
147147 let newVotingState = (votingState + voteValueInt)
148148 if (isMembershipWorkingGroup(i.caller))
149149 then if (isMembershipVotedForCandidate(membershipAddress, candidateAddress))
150150 then throw("You have already voted")
151151 else WriteSet([DataEntry(((membershipAddress + "_voted_") + candidateAddress), 1), DataEntry(votingKey, newVotingState), DataEntry(votedKey, votedVal)])
152152 else throw("You have no rights")
153153 }
154154
155155

github/deemru/w8io/026f985 
33.00 ms