tx · Ec2Xkiirivfc43Q24fXBzGpHJq3hX3fjAVjJXeDAswMK 3MuBASwpgfJm92SpDkyLsdPQPD2tMSoj2WA: -1.00000000 Waves 2021.05.18 12:39 [1530949] smart account 3MuBASwpgfJm92SpDkyLsdPQPD2tMSoj2WA > SELF 0.00000000 Waves
{ "type": 13, "id": "Ec2Xkiirivfc43Q24fXBzGpHJq3hX3fjAVjJXeDAswMK", "fee": 100000000, "feeAssetId": null, "timestamp": 1621330880810, "version": 2, "chainId": 84, "sender": "3MuBASwpgfJm92SpDkyLsdPQPD2tMSoj2WA", "senderPublicKey": "AvBfKvojixmeNDg4JjhMyQVM56iwkf7z6TXUzXcbSJ5L", "proofs": [ "2eEG3NU8LKdpwhPYnbinqpqGeL1ZhQkVpaAqAoiq1owCNiqb6uBCNiQvGLesFzJYxSpssrM5oFwPEfTBZ6ZpUm7K" ], "script": "base64:AAIDAAAAAAAAACEIARIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgAAAAPAQAAAAdpc093bmVyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEAAAABYQkAAGYAAAACCQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAAttZW1iZXJzaGlwXwkABCUAAAABBQAAAAFhAgAAAAdfc3RhdHVzAAAAAAAAAAAAAQAAAA5pc1dvcmtpbmdHcm91cAAAAAEAAAABYQkAAGYAAAACCQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEJAAEsA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lRm9yREFPTWVtYmVyQ2FuZGlkYXRlAAAAAQAAABBjYW5kaWRhdGVBZGRyZXNzBAAAABFtZW1iZXJzaGlwQWRkcmVzcwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIDCQEAAAAYaXNNZW1iZXJzaGlwV29ya2luZ0dyb3VwAAAAAQgFAAAAAWkAAAAGY2FsbGVyAwkBAAAAHWlzTWVtYmVyc2hpcFZvdGVkRm9yQ2FuZGlkYXRlAAAAAgUAAAARbWVtYmVyc2hpcEFkZHJlc3MFAAAAEGNhbmRpZGF0ZUFkZHJlc3MJAAACAAAAAQIAAAAWWW91IGhhdmUgYWxyZWFkeSB2b3RlZAkBAAAAGm1lbWJlcnNoaXBWb3RlRm9yQ2FuZGlkYXRlAAAAAgUAAAARbWVtYmVyc2hpcEFkZHJlc3MFAAAAEGNhbmRpZGF0ZUFkZHJlc3MJAAACAAAAAQIAAAASWW91IGhhdmUgbm8gcmlnaHRzAAAAAK+125Y=", "height": 1530949, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hzs92g88V7EKvippDTJPngRzmQTezifAVUhNYMguTey8 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
99 | 99 | let newGroup = ((group + ";") + address) | |
100 | 100 | let groupSize = tryGetInteger("membership_working_group_members_size") | |
101 | 101 | let newGroupSize = (groupSize + 1) | |
102 | - | WriteSet([DataEntry((("membership" + address) + "_status"), 1), DataEntry("membership_working_group_members", newGroup), DataEntry("membership_working_group_members_size", newGroupSize)]) | |
102 | + | WriteSet([DataEntry((("membership_" + address) + "_status"), 1), DataEntry("membership_working_group_members", newGroup), DataEntry("membership_working_group_members_size", newGroupSize)]) | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
109 | 109 | then 1 | |
110 | 110 | else if ((value == "2")) | |
111 | 111 | then 2 | |
112 | - | else throw("You need to vote with '1' or ' | |
112 | + | else throw("You need to vote with '0' or '1' or '2' value") | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | @Callable(i) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func isOwner (address) = (address == this) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func tryGetInteger (key) = { | |
8 | 8 | let val = match getInteger(this, key) { | |
9 | 9 | case b: Int => | |
10 | 10 | b | |
11 | 11 | case _ => | |
12 | 12 | 0 | |
13 | 13 | } | |
14 | 14 | val | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func isMembershipWorkingGroup (a) = (tryGetInteger((("membership_" + toString(a)) + "_status")) > 0) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func isWorkingGroup (a) = (tryGetInteger((("working_group_" + toString(a)) + "_status")) > 0) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func isDAOMember (a) = if ((tryGetInteger((("dao_member_" + toString(a)) + "_status")) > 0)) | |
25 | 25 | then (2 > tryGetInteger((("dao_member_" + toString(a)) + "_status"))) | |
26 | 26 | else false | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func isMembershipVotedForCandidate (membershipAddress,candidateAddress) = (tryGetInteger(((membershipAddress + "_voted_") + candidateAddress)) > 0) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func membershipVoteForCandidate (membershipAddress,candidateAddress) = WriteSet([DataEntry(((membershipAddress + "_voted_") + candidateAddress), 1)]) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func tryGetString (key) = { | |
36 | 36 | let val = match getString(this, key) { | |
37 | 37 | case b: String => | |
38 | 38 | b | |
39 | 39 | case _ => | |
40 | 40 | "" | |
41 | 41 | } | |
42 | 42 | val | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func getWorkingGroup () = { | |
47 | 47 | let val = match getString(this, "working_group_members") { | |
48 | 48 | case b: String => | |
49 | 49 | b | |
50 | 50 | case _ => | |
51 | 51 | "" | |
52 | 52 | } | |
53 | 53 | val | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func addToWorkingGroup (address) = { | |
58 | 58 | let group = getWorkingGroup() | |
59 | 59 | let newGroup = ((group + ";") + address) | |
60 | 60 | let groupSize = tryGetInteger("working_group_size") | |
61 | 61 | let newGroupSize = (groupSize + 1) | |
62 | 62 | WriteSet([DataEntry((("working_group_member_" + address) + "_status"), 1), DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize)]) | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getDAOMember () = { | |
67 | 67 | let val = match getString(this, "dao_members") { | |
68 | 68 | case b: String => | |
69 | 69 | b | |
70 | 70 | case _ => | |
71 | 71 | "" | |
72 | 72 | } | |
73 | 73 | val | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func addToDAOMember (address) = { | |
78 | 78 | let group = getDAOMember() | |
79 | 79 | let newGroup = ((group + ";") + address) | |
80 | 80 | let groupSize = tryGetInteger("dao_members_size") | |
81 | 81 | let newGroupSize = (groupSize + 1) | |
82 | 82 | WriteSet([DataEntry((("dao_member_" + address) + "_status"), 1), DataEntry("dao_members", newGroup), DataEntry("dao_members_size", newGroupSize)]) | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getMembershipWorkingGroup () = { | |
87 | 87 | let val = match getString(this, "membership_working_group_members") { | |
88 | 88 | case b: String => | |
89 | 89 | b | |
90 | 90 | case _ => | |
91 | 91 | "" | |
92 | 92 | } | |
93 | 93 | val | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func addToMembershipWorkingGroup (address) = { | |
98 | 98 | let group = getMembershipWorkingGroup() | |
99 | 99 | let newGroup = ((group + ";") + address) | |
100 | 100 | let groupSize = tryGetInteger("membership_working_group_members_size") | |
101 | 101 | let newGroupSize = (groupSize + 1) | |
102 | - | WriteSet([DataEntry((("membership" + address) + "_status"), 1), DataEntry("membership_working_group_members", newGroup), DataEntry("membership_working_group_members_size", newGroupSize)]) | |
102 | + | WriteSet([DataEntry((("membership_" + address) + "_status"), 1), DataEntry("membership_working_group_members", newGroup), DataEntry("membership_working_group_members_size", newGroupSize)]) | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getVoteValue (value) = if ((value == "0")) | |
107 | 107 | then 0 | |
108 | 108 | else if ((value == "1")) | |
109 | 109 | then 1 | |
110 | 110 | else if ((value == "2")) | |
111 | 111 | then 2 | |
112 | - | else throw("You need to vote with '1' or ' | |
112 | + | else throw("You need to vote with '0' or '1' or '2' value") | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | @Callable(i) | |
116 | 116 | func proposeCandidateForDAOMember (address) = { | |
117 | 117 | let caller = toString(i.caller) | |
118 | 118 | if ((tryGetInteger(("candidates_" + address)) == 1)) | |
119 | 119 | then throw("This user already exists") | |
120 | 120 | else WriteSet([DataEntry(("candidates_" + address), "proposed")]) | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | ||
125 | 125 | @Callable(i) | |
126 | 126 | func ownerAddDAOMember (address) = addToDAOMember(address) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(i) | |
131 | 131 | func ownerAddWorkingGroup (address) = addToWorkingGroup(address) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | ||
135 | 135 | @Callable(i) | |
136 | 136 | func ownerAddMembershioWorkingGroup (address) = addToMembershipWorkingGroup(address) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(i) | |
141 | 141 | func decisionOnMember (memberAddress,decisionValue) = if (!(isOwner(i.caller))) | |
142 | 142 | then throw("access only to the owner") | |
143 | 143 | else { | |
144 | 144 | let voteValueInt = getVoteValue(decisionValue) | |
145 | 145 | if ((voteValueInt == 1)) | |
146 | 146 | then addToWorkingGroup(memberAddress) | |
147 | 147 | else WriteSet([DataEntry((("dao_member_" + memberAddress) + "_status"), decisionValue)]) | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | ||
152 | 152 | @Callable(i) | |
153 | 153 | func membershipVoteForDAOMemberCandidate (candidateAddress) = { | |
154 | 154 | let membershipAddress = toString(i.caller) | |
155 | 155 | if (isMembershipWorkingGroup(i.caller)) | |
156 | 156 | then if (isMembershipVotedForCandidate(membershipAddress, candidateAddress)) | |
157 | 157 | then throw("You have already voted") | |
158 | 158 | else membershipVoteForCandidate(membershipAddress, candidateAddress) | |
159 | 159 | else throw("You have no rights") | |
160 | 160 | } | |
161 | 161 | ||
162 | 162 |
github/deemru/w8io/169f3d6 36.38 ms ◑