tx · Hzs92g88V7EKvippDTJPngRzmQTezifAVUhNYMguTey8

3MuBASwpgfJm92SpDkyLsdPQPD2tMSoj2WA:  -0.10000000 Waves

2021.05.18 12:05 [1530918] smart account 3MuBASwpgfJm92SpDkyLsdPQPD2tMSoj2WA > SELF 0.00000000 Waves

{ "type": 13, "id": "Hzs92g88V7EKvippDTJPngRzmQTezifAVUhNYMguTey8", "fee": 10000000, "feeAssetId": null, "timestamp": 1621328732279, "version": 2, "chainId": 84, "sender": "3MuBASwpgfJm92SpDkyLsdPQPD2tMSoj2WA", "senderPublicKey": "AvBfKvojixmeNDg4JjhMyQVM56iwkf7z6TXUzXcbSJ5L", "proofs": [ "ueEJakSBLW8DawrGsJGLQWHjp9NV9yv2cDfvzF9YZp9E572ygNAxggVJU2FY1vTk7do16rPPzbEtvsvBrU8smR4" ], "script": "base64:AAIDAAAAAAAAACEIARIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgAAAAPAQAAAAdpc093bmVyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEAAAABYQkAAGYAAAACCQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAAttZW1iZXJzaGlwXwkABCUAAAABBQAAAAFhAgAAAAdfc3RhdHVzAAAAAAAAAAAAAQAAAA5pc1dvcmtpbmdHcm91cAAAAAEAAAABYQkAAGYAAAACCQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAA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F0ZQAAAAEAAAAQY2FuZGlkYXRlQWRkcmVzcwQAAAARbWVtYmVyc2hpcEFkZHJlc3MJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAwkBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEIBQAAAAFpAAAABmNhbGxlcgMJAQAAAB1pc01lbWJlcnNoaXBWb3RlZEZvckNhbmRpZGF0ZQAAAAIFAAAAEW1lbWJlcnNoaXBBZGRyZXNzBQAAABBjYW5kaWRhdGVBZGRyZXNzCQAAAgAAAAECAAAAFllvdSBoYXZlIGFscmVhZHkgdm90ZWQJAQAAABptZW1iZXJzaGlwVm90ZUZvckNhbmRpZGF0ZQAAAAIFAAAAEW1lbWJlcnNoaXBBZGRyZXNzBQAAABBjYW5kaWRhdGVBZGRyZXNzCQAAAgAAAAECAAAAEllvdSBoYXZlIG5vIHJpZ2h0cwAAAAA4YgXM", "height": 1530918, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4HZjtvaMENwFH19vGTNSsuCKtnkVwAytaVmsmFaJ28gR Next: Ec2Xkiirivfc43Q24fXBzGpHJq3hX3fjAVjJXeDAswMK Diff:
OldNewDifferences
5959 let newGroup = ((group + ";") + address)
6060 let groupSize = tryGetInteger("working_group_size")
6161 let newGroupSize = (groupSize + 1)
62- WriteSet([DataEntry((("dao_member_" + address) + "_status"), 1), DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize)])
62+ WriteSet([DataEntry((("working_group_member_" + address) + "_status"), 1), DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize)])
6363 }
6464
6565
112112 else throw("You need to vote with '1' or '0' value")
113113
114114
115-func xxx (address) = DataEntry((("dao_member_" + address) + "_status"), 1)
116-
117-
118115 @Callable(i)
119116 func proposeCandidateForDAOMember (address) = {
120117 let caller = toString(i.caller)
131128
132129
133130 @Callable(i)
134-func ownerAddWorkingGroup (address) = WriteSet([DataEntry((("working_group" + address) + "_status"), 1)])
131+func ownerAddWorkingGroup (address) = addToWorkingGroup(address)
135132
136133
137134
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func isOwner (address) = (address == this)
55
66
77 func tryGetInteger (key) = {
88 let val = match getInteger(this, key) {
99 case b: Int =>
1010 b
1111 case _ =>
1212 0
1313 }
1414 val
1515 }
1616
1717
1818 func isMembershipWorkingGroup (a) = (tryGetInteger((("membership_" + toString(a)) + "_status")) > 0)
1919
2020
2121 func isWorkingGroup (a) = (tryGetInteger((("working_group_" + toString(a)) + "_status")) > 0)
2222
2323
2424 func isDAOMember (a) = if ((tryGetInteger((("dao_member_" + toString(a)) + "_status")) > 0))
2525 then (2 > tryGetInteger((("dao_member_" + toString(a)) + "_status")))
2626 else false
2727
2828
2929 func isMembershipVotedForCandidate (membershipAddress,candidateAddress) = (tryGetInteger(((membershipAddress + "_voted_") + candidateAddress)) > 0)
3030
3131
3232 func membershipVoteForCandidate (membershipAddress,candidateAddress) = WriteSet([DataEntry(((membershipAddress + "_voted_") + candidateAddress), 1)])
3333
3434
3535 func tryGetString (key) = {
3636 let val = match getString(this, key) {
3737 case b: String =>
3838 b
3939 case _ =>
4040 ""
4141 }
4242 val
4343 }
4444
4545
4646 func getWorkingGroup () = {
4747 let val = match getString(this, "working_group_members") {
4848 case b: String =>
4949 b
5050 case _ =>
5151 ""
5252 }
5353 val
5454 }
5555
5656
5757 func addToWorkingGroup (address) = {
5858 let group = getWorkingGroup()
5959 let newGroup = ((group + ";") + address)
6060 let groupSize = tryGetInteger("working_group_size")
6161 let newGroupSize = (groupSize + 1)
62- WriteSet([DataEntry((("dao_member_" + address) + "_status"), 1), DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize)])
62+ WriteSet([DataEntry((("working_group_member_" + address) + "_status"), 1), DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize)])
6363 }
6464
6565
6666 func getDAOMember () = {
6767 let val = match getString(this, "dao_members") {
6868 case b: String =>
6969 b
7070 case _ =>
7171 ""
7272 }
7373 val
7474 }
7575
7676
7777 func addToDAOMember (address) = {
7878 let group = getDAOMember()
7979 let newGroup = ((group + ";") + address)
8080 let groupSize = tryGetInteger("dao_members_size")
8181 let newGroupSize = (groupSize + 1)
8282 WriteSet([DataEntry((("dao_member_" + address) + "_status"), 1), DataEntry("dao_members", newGroup), DataEntry("dao_members_size", newGroupSize)])
8383 }
8484
8585
8686 func getMembershipWorkingGroup () = {
8787 let val = match getString(this, "membership_working_group_members") {
8888 case b: String =>
8989 b
9090 case _ =>
9191 ""
9292 }
9393 val
9494 }
9595
9696
9797 func addToMembershipWorkingGroup (address) = {
9898 let group = getMembershipWorkingGroup()
9999 let newGroup = ((group + ";") + address)
100100 let groupSize = tryGetInteger("membership_working_group_members_size")
101101 let newGroupSize = (groupSize + 1)
102102 WriteSet([DataEntry((("membership" + address) + "_status"), 1), DataEntry("membership_working_group_members", newGroup), DataEntry("membership_working_group_members_size", newGroupSize)])
103103 }
104104
105105
106106 func getVoteValue (value) = if ((value == "0"))
107107 then 0
108108 else if ((value == "1"))
109109 then 1
110110 else if ((value == "2"))
111111 then 2
112112 else throw("You need to vote with '1' or '0' value")
113113
114114
115-func xxx (address) = DataEntry((("dao_member_" + address) + "_status"), 1)
116-
117-
118115 @Callable(i)
119116 func proposeCandidateForDAOMember (address) = {
120117 let caller = toString(i.caller)
121118 if ((tryGetInteger(("candidates_" + address)) == 1))
122119 then throw("This user already exists")
123120 else WriteSet([DataEntry(("candidates_" + address), "proposed")])
124121 }
125122
126123
127124
128125 @Callable(i)
129126 func ownerAddDAOMember (address) = addToDAOMember(address)
130127
131128
132129
133130 @Callable(i)
134-func ownerAddWorkingGroup (address) = WriteSet([DataEntry((("working_group" + address) + "_status"), 1)])
131+func ownerAddWorkingGroup (address) = addToWorkingGroup(address)
135132
136133
137134
138135 @Callable(i)
139136 func ownerAddMembershioWorkingGroup (address) = addToMembershipWorkingGroup(address)
140137
141138
142139
143140 @Callable(i)
144141 func decisionOnMember (memberAddress,decisionValue) = if (!(isOwner(i.caller)))
145142 then throw("access only to the owner")
146143 else {
147144 let voteValueInt = getVoteValue(decisionValue)
148145 if ((voteValueInt == 1))
149146 then addToWorkingGroup(memberAddress)
150147 else WriteSet([DataEntry((("dao_member_" + memberAddress) + "_status"), decisionValue)])
151148 }
152149
153150
154151
155152 @Callable(i)
156153 func membershipVoteForDAOMemberCandidate (candidateAddress) = {
157154 let membershipAddress = toString(i.caller)
158155 if (isMembershipWorkingGroup(i.caller))
159156 then if (isMembershipVotedForCandidate(membershipAddress, candidateAddress))
160157 then throw("You have already voted")
161158 else membershipVoteForCandidate(membershipAddress, candidateAddress)
162159 else throw("You have no rights")
163160 }
164161
165162

github/deemru/w8io/169f3d6 
40.44 ms