tx · 6JS4FoujrrwzN2ajHzTFBb23TLugrwkEsZYNwrDTUaVL

3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA:  -0.10000000 Waves

2020.12.21 18:51 [1318656] smart account 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA > SELF 0.00000000 Waves

{ "type": 13, "id": "6JS4FoujrrwzN2ajHzTFBb23TLugrwkEsZYNwrDTUaVL", "fee": 10000000, "feeAssetId": null, "timestamp": 1608565948085, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "cJuTJYEdiwLEs9yZUvdF8KPwo4k5Tqc6dhGTezXM2Zi6G7WE2rmQ1nNUWSc1A3RFWPWiAgQScuEzk3A2Qy8z1qK" ], "script": "base64:AAIDAAAAAAAAADUIARIECgIICBIDCgEIEgQKAggBEgMKAQgSBQoDCAgIEgUKAwgIARIDCgEIEgMKAQgSAwoBCAAAAAoAAAAADG1haW5Db250cmFjdAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTXdSemkyQm1xWlpYV3JDR0N3Y1JRTHNuaWMyQW9kNnpoUwAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAA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NTMpAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAADnRlYW1JZGVudGlmaWVyAgAAAAdfbGVhZGVyCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfc3RhdHVzAgAAAA13b3JrX2ZpbmlzaGVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAVfYXBwXwUAAAAOdGVhbUlkZW50aWZpZXICAAAACF9wcm9jZXNzAgAAAA13b3JrX2ZpbmlzaGVkBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAAAGjF1+A==", "height": 1318656, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2uKUfyoqkjweyUW34JYAvCCegMypX2bQAyvrLThbYgF3 Next: HkCL8mHt1CDtPsYzRroxvjCfdQ3reRB89WQJHbvg9cJL Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let mainContract = addressFromStringValue("3MwRzi2BmqZZXWrCGCwcRQLsnic2Aod6zhS")
5+
46 let QUORUM = 1
57
68 func tryGetInteger (key) = {
2931
3032
3133 func getGroup () = {
32- let val = match getString(this, "working_group") {
34+ let val = match getString(mainContract, "working_group_members") {
3335 case b: String =>
3436 b
3537 case _ =>
4042
4143
4244 func getMembers () = {
43- let val = match getString(this, "dao_members") {
45+ let val = match getString(mainContract, "dao_members") {
4446 case b: String =>
4547 b
4648 case _ =>
5052 }
5153
5254
53-func isGroupMember (a) = (tryGetInteger((("working_group_member_" + toString(a)) + "_weight")) > 0)
55+func getDAOSize () = {
56+ let val = match getInteger(mainContract, "dao_size") {
57+ case b: Int =>
58+ b
59+ case _ =>
60+ 0
61+ }
62+ val
63+ }
5464
5565
56-func canMemberVote (i) = (tryGetInteger((("dao_member_" + toString(i.caller)) + "_weight")) > 0)
66+func isGroupMember (a) = {
67+ let val = match getInteger(mainContract, (("working_group_member_" + toString(a)) + "_weight")) {
68+ case b: Int =>
69+ b
70+ case _ =>
71+ 0
72+ }
73+ (val > 0)
74+ }
5775
5876
59-@Callable(i)
60-func addDAOMember (memberAddress) = if (!(isOwner(i.caller)))
61- then throw("access only to the DAO owner")
62- else if ((tryGetInteger((("dao_member_" + memberAddress) + "_weight")) == 1))
63- then throw("This user already exists")
64- else {
65- let group = getMembers()
66- let newGroup = ((group + ";") + memberAddress)
67- let groupSize = tryGetInteger("dao_size")
68- let newGroupSize = (groupSize + 1)
69- WriteSet([DataEntry("dao_members", newGroup), DataEntry("dao_size", newGroupSize), DataEntry((("dao_member_" + memberAddress) + "_weight"), 1)])
70- }
71-
72-
73-
74-@Callable(i)
75-func addGroupMember (memberAddress) = if (!(isOwner(i.caller)))
76- then throw("access only to the DAO owner")
77- else if ((tryGetInteger((("working_group_member_" + memberAddress) + "_weight")) == 1))
78- then throw("This user already exists")
79- else {
80- let group = getGroup()
81- let newGroup = ((group + ";") + memberAddress)
82- let groupSize = tryGetInteger("working_group_size")
83- let newGroupSize = (groupSize + 1)
84- WriteSet([DataEntry("working_group_name", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
85- }
86-
77+func canMemberVote (i) = {
78+ let val = match getInteger(mainContract, (("dao_member_" + toString(i.caller)) + "_weight")) {
79+ case b: Int =>
80+ b
81+ case _ =>
82+ 0
83+ }
84+ (val > 0)
85+ }
8786
8887
8988 @Callable(i)
130129
131130
132131 @Callable(i)
133-func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / tryGetInteger("dao_size"))))
132+func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / getDAOSize())))
134133 then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting"))
135134 else if (!(isGroupMember(i.caller)))
136135 then throw("grants working group access only")
222221 then throw("No one has yet responded to the grant")
223222 else {
224223 let chosenTeamId = {
225- let $list1093010961 = [0, 1]
226- let $size1093010961 = size($list1093010961)
227- let $acc01093010961 = 0
228- if (($size1093010961 == 0))
229- then $acc01093010961
224+ let $list95009531 = [0, 1]
225+ let $size95009531 = size($list95009531)
226+ let $acc095009531 = 0
227+ if (($size95009531 == 0))
228+ then $acc095009531
230229 else {
231- let $acc11093010961 = hasMoreVotes($acc01093010961, $list1093010961[0])
232- if (($size1093010961 == 1))
233- then $acc11093010961
230+ let $acc195009531 = hasMoreVotes($acc095009531, $list95009531[0])
231+ if (($size95009531 == 1))
232+ then $acc195009531
234233 else {
235- let $acc21093010961 = hasMoreVotes($acc11093010961, $list1093010961[1])
236- if (($size1093010961 == 2))
237- then $acc21093010961
234+ let $acc295009531 = hasMoreVotes($acc195009531, $list95009531[1])
235+ if (($size95009531 == 2))
236+ then $acc295009531
238237 else {
239- let $acc31093010961 = hasMoreVotes($acc21093010961, $list1093010961[2])
238+ let $acc395009531 = hasMoreVotes($acc295009531, $list95009531[2])
240239 throw("List size exceed 2")
241240 }
242241 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let mainContract = addressFromStringValue("3MwRzi2BmqZZXWrCGCwcRQLsnic2Aod6zhS")
5+
46 let QUORUM = 1
57
68 func tryGetInteger (key) = {
79 let val = match getInteger(this, key) {
810 case b: Int =>
911 b
1012 case _ =>
1113 0
1214 }
1315 val
1416 }
1517
1618
1719 func tryGetString (key) = {
1820 let val = match getString(this, key) {
1921 case b: String =>
2022 b
2123 case _ =>
2224 ""
2325 }
2426 val
2527 }
2628
2729
2830 func isOwner (address) = (address == this)
2931
3032
3133 func getGroup () = {
32- let val = match getString(this, "working_group") {
34+ let val = match getString(mainContract, "working_group_members") {
3335 case b: String =>
3436 b
3537 case _ =>
3638 ""
3739 }
3840 val
3941 }
4042
4143
4244 func getMembers () = {
43- let val = match getString(this, "dao_members") {
45+ let val = match getString(mainContract, "dao_members") {
4446 case b: String =>
4547 b
4648 case _ =>
4749 ""
4850 }
4951 val
5052 }
5153
5254
53-func isGroupMember (a) = (tryGetInteger((("working_group_member_" + toString(a)) + "_weight")) > 0)
55+func getDAOSize () = {
56+ let val = match getInteger(mainContract, "dao_size") {
57+ case b: Int =>
58+ b
59+ case _ =>
60+ 0
61+ }
62+ val
63+ }
5464
5565
56-func canMemberVote (i) = (tryGetInteger((("dao_member_" + toString(i.caller)) + "_weight")) > 0)
66+func isGroupMember (a) = {
67+ let val = match getInteger(mainContract, (("working_group_member_" + toString(a)) + "_weight")) {
68+ case b: Int =>
69+ b
70+ case _ =>
71+ 0
72+ }
73+ (val > 0)
74+ }
5775
5876
59-@Callable(i)
60-func addDAOMember (memberAddress) = if (!(isOwner(i.caller)))
61- then throw("access only to the DAO owner")
62- else if ((tryGetInteger((("dao_member_" + memberAddress) + "_weight")) == 1))
63- then throw("This user already exists")
64- else {
65- let group = getMembers()
66- let newGroup = ((group + ";") + memberAddress)
67- let groupSize = tryGetInteger("dao_size")
68- let newGroupSize = (groupSize + 1)
69- WriteSet([DataEntry("dao_members", newGroup), DataEntry("dao_size", newGroupSize), DataEntry((("dao_member_" + memberAddress) + "_weight"), 1)])
70- }
71-
72-
73-
74-@Callable(i)
75-func addGroupMember (memberAddress) = if (!(isOwner(i.caller)))
76- then throw("access only to the DAO owner")
77- else if ((tryGetInteger((("working_group_member_" + memberAddress) + "_weight")) == 1))
78- then throw("This user already exists")
79- else {
80- let group = getGroup()
81- let newGroup = ((group + ";") + memberAddress)
82- let groupSize = tryGetInteger("working_group_size")
83- let newGroupSize = (groupSize + 1)
84- WriteSet([DataEntry("working_group_name", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
85- }
86-
77+func canMemberVote (i) = {
78+ let val = match getInteger(mainContract, (("dao_member_" + toString(i.caller)) + "_weight")) {
79+ case b: Int =>
80+ b
81+ case _ =>
82+ 0
83+ }
84+ (val > 0)
85+ }
8786
8887
8988 @Callable(i)
9089 func addTask (title,link) = if (!(isGroupMember(i.caller)))
9190 then throw("grants working group access only")
9291 else WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link)])
9392
9493
9594
9695 @Callable(i)
9796 func addTaskDetails (taskId) = if (!(isGroupMember(i.caller)))
9897 then throw("grants working group access only")
9998 else {
10099 let reward = extract(i.payment).amount
101100 WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward), DataEntry((("tasks_" + taskId) + "_status"), "proposed")])
102101 }
103102
104103
105104
106105 @Callable(i)
107106 func voteForTaskProposal (taskId,voteValue) = if (!(canMemberVote(i)))
108107 then throw("you can't vote")
109108 else if ((getStringValue(this, (("tasks_" + taskId) + "_status")) != "proposed"))
110109 then throw("voting is closed or not started")
111110 else if (if ((voteValue != -1))
112111 then (voteValue != 1)
113112 else false)
114113 then throw("you need to vote 1 or -1")
115114 else {
116115 let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller))
117116 let previousVote = tryGetInteger(voteKey)
118117 if (!((previousVote == 0)))
119118 then throw("you have already voted")
120119 else {
121120 let votingKey = (("tasks_" + taskId) + "_voting_state")
122121 let votingState = tryGetInteger(votingKey)
123122 let votesAmountKey = (("tasks_" + taskId) + "_voting_amount")
124123 let votesAmountState = (tryGetInteger(votingKey) + 1)
125124 let newVotingState = (votingState + voteValue)
126125 ScriptResult(WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)]), TransferSet([ScriptTransfer(i.caller, 500000, unit)]))
127126 }
128127 }
129128
130129
131130
132131 @Callable(i)
133-func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / tryGetInteger("dao_size"))))
132+func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / getDAOSize())))
134133 then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting"))
135134 else if (!(isGroupMember(i.caller)))
136135 then throw("grants working group access only")
137136 else {
138137 let votingKey = (("tasks_" + taskId) + "_voting_state")
139138 let votingState = tryGetInteger(votingKey)
140139 if ((votingState > 0))
141140 then {
142141 let votingResult = "ready_to_apply"
143142 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)])
144143 }
145144 else {
146145 let votingResult = "rejected"
147146 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)])
148147 }
149148 }
150149
151150
152151
153152 @Callable(i)
154153 func applyForTask (taskId,teamName,link) = {
155154 let status = tryGetString((("tasks_" + taskId) + "_status"))
156155 if ((status != "ready_to_apply"))
157156 then throw("This grant has not yet been approved")
158157 else {
159158 let listKey = (("tasks_" + taskId) + "_applicants")
160159 let currentApplicantsList = tryGetString(listKey)
161160 let applicantKey = drop(toString(i.caller), 10)
162161 let newApplicantsList = ((currentApplicantsList + ";") + toString(i.caller))
163162 WriteSet([DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_name"), teamName), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_link"), link), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_leader"), toString(i.caller)), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_id"), applicantKey), DataEntry(listKey, newApplicantsList)])
164163 }
165164 }
166165
167166
168167
169168 @Callable(i)
170169 func voteForApplicant (taskId,teamIdentifier,voteValue) = if (!(canMemberVote(i)))
171170 then throw("you can't vote")
172171 else {
173172 let voteHash = (drop(toString(i.caller), 10) + drop(teamIdentifier, 10))
174173 let voteKey = ((("tasks_" + taskId) + "_vote_") + voteHash)
175174 let vote = tryGetInteger(voteKey)
176175 if ((vote != 0))
177176 then throw("you have already voted on this team")
178177 else {
179178 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
180179 let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_score")
181180 let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey))
182181 let newTeamScore = (voteValue + tryGetInteger(teamScoreKey))
183182 WriteSet([DataEntry(voteKey, voteValue), DataEntry(teamScoreKey, newTeamScore)])
184183 }
185184 }
186185
187186
188187
189188 @Callable(i)
190189 func finishApplicantsVoting (taskId) = {
191190 func isApplicantVotedEnough (aid,aid2) = {
192191 let listKey = (("tasks_" + taskId) + "_applicants")
193192 let applicantsList = split(getStringValue(this, listKey), ";")
194193 let teamIdentifier = applicantsList[aid]
195194 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
196195 let teamVotesAmount = tryGetInteger(teamVotesAmountKey)
197196 if ((teamVotesAmount > 0))
198197 then 1
199198 else throw(("not enough votes to make decision on " + teamIdentifier))
200199 }
201200
202201 func hasMoreVotes (aid,aid2) = {
203202 let listKey = (("tasks_" + taskId) + "_applicants")
204203 let applicantsList = split(getStringValue(this, listKey), ";")
205204 let teamIdentifier = applicantsList[aid]
206205 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
207206 let teamVotesAmount = tryGetInteger(teamVotesAmountKey)
208207 let team2Identifier = applicantsList[aid2]
209208 let team2VotesAmountKey = (((("tasks_" + taskId) + "_app_") + team2Identifier) + "_votes")
210209 let team2VotesAmount = tryGetInteger(team2VotesAmountKey)
211210 if ((teamVotesAmount > team2VotesAmount))
212211 then aid
213212 else aid2
214213 }
215214
216215 if (!(isGroupMember(i.caller)))
217216 then throw("grants working group access only")
218217 else {
219218 let listKeys = tryGetString((("tasks_" + taskId) + "_applicants"))
220219 let applicantsList = split(listKeys, ";")
221220 if ((size(applicantsList) == 0))
222221 then throw("No one has yet responded to the grant")
223222 else {
224223 let chosenTeamId = {
225- let $list1093010961 = [0, 1]
226- let $size1093010961 = size($list1093010961)
227- let $acc01093010961 = 0
228- if (($size1093010961 == 0))
229- then $acc01093010961
224+ let $list95009531 = [0, 1]
225+ let $size95009531 = size($list95009531)
226+ let $acc095009531 = 0
227+ if (($size95009531 == 0))
228+ then $acc095009531
230229 else {
231- let $acc11093010961 = hasMoreVotes($acc01093010961, $list1093010961[0])
232- if (($size1093010961 == 1))
233- then $acc11093010961
230+ let $acc195009531 = hasMoreVotes($acc095009531, $list95009531[0])
231+ if (($size95009531 == 1))
232+ then $acc195009531
234233 else {
235- let $acc21093010961 = hasMoreVotes($acc11093010961, $list1093010961[1])
236- if (($size1093010961 == 2))
237- then $acc21093010961
234+ let $acc295009531 = hasMoreVotes($acc195009531, $list95009531[1])
235+ if (($size95009531 == 2))
236+ then $acc295009531
238237 else {
239- let $acc31093010961 = hasMoreVotes($acc21093010961, $list1093010961[2])
238+ let $acc395009531 = hasMoreVotes($acc295009531, $list95009531[2])
240239 throw("List size exceed 2")
241240 }
242241 }
243242 }
244243 }
245244 let teamIdentifier = applicantsList[chosenTeamId]
246245 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")])
247246 }
248247 }
249248 }
250249
251250
252251
253252 @Callable(i)
254253 func startWork (taskId) = {
255254 let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer"))
256255 if ((toString(i.caller) != getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))))
257256 then throw("team leader only")
258257 else WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_started")])
259258 }
260259
261260
262261
263262 @Callable(i)
264263 func acceptWorkResult (taskId) = if (!(isGroupMember(i.caller)))
265264 then throw("grants working group access only")
266265 else {
267266 let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward"))
268267 let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer"))
269268 let teamAddress = getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))
270269 ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)]))
271270 }
272271
273272

github/deemru/w8io/026f985 
51.17 ms