tx · BdPmAAKEac4se3nbTii5f46ksHuQsaSNDhjUuiw4XrtV

3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5:  -0.10000000 Waves

2020.11.18 02:15 [1270016] smart account 3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5 > SELF 0.00000000 Waves

{ "type": 13, "id": "BdPmAAKEac4se3nbTii5f46ksHuQsaSNDhjUuiw4XrtV", "fee": 10000000, "feeAssetId": null, "timestamp": 1605654954749, "version": 2, "chainId": 84, "sender": "3N1eyWNffhxPCmYBWBdnWbhmAVAVjkTEqY5", "senderPublicKey": "BWQB37E3JLeot6EcSVXsbJMugLUYNarK8xU8W5XAPsvJ", "proofs": [ "4HkcfasmZZyF71ryJoCFEjj5XxGYpyF6LFjwrGYwjdqKXiizSFX84xsB7i1rg5jLQ7wyrjhRy6VCSNysba8W6Mix" ], "script": "base64:AAIDAAAAAAAAAD0IARIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgSBAoCCAgSBQoDCAgBEgMKAQgSAwoBCBIDCgEIAAAACAAAAAAGUVVPUlVNAAAAAAAAAAAyAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAHaXNPd25lcgAAAAEAAAAHYWRkcmVzcwkAAAAAAAACBQAAAAdhZGRyZXNzBQAAAAR0aGlzAQAAAA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ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAAAMcYG/Q==", "height": 1270016, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: At3T9h93bZatFJqiaXVUHZcRYeneTSjps8LViac7m6Nd Next: 6CDtCpDXRNcP5bYXMSydMcQXBsgpnvW4zzqN8pHbr7EB Diff:
OldNewDifferences
119119 let votesAmountKey = (("tasks_" + taskId) + "_voting_amount")
120120 let votesAmountState = (tryGetInteger(votingKey) + 1)
121121 let newVotingState = (votingState + voteValue)
122- WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)])
122+ ScriptResult(WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)]), TransferSet([ScriptTransfer(i.caller, 500000, unit)]))
123123 }
124124 }
125125
207207 if (!(isGroupMember(i.caller)))
208208 then throw("grants working group access only")
209209 else {
210- let chosenTeamId = {
211- let $list98469877 = [0, 1]
212- let $size98469877 = size($list98469877)
213- let $acc098469877 = 0
214- if (($size98469877 == 0))
215- then $acc098469877
216- else {
217- let $acc198469877 = hasMoreVotes($acc098469877, $list98469877[0])
218- if (($size98469877 == 1))
219- then $acc198469877
210+ let listKeys = tryGetString((("tasks_" + taskId) + "_applicants"))
211+ let applicantsList = split(listKeys, ";")
212+ if ((size(applicantsList) == 0))
213+ then throw("No one has yet responded to the grant")
214+ else {
215+ let chosenTeamId = {
216+ let $list1008510116 = [0, 1]
217+ let $size1008510116 = size($list1008510116)
218+ let $acc01008510116 = 0
219+ if (($size1008510116 == 0))
220+ then $acc01008510116
220221 else {
221- let $acc298469877 = hasMoreVotes($acc198469877, $list98469877[1])
222- if (($size98469877 == 2))
223- then $acc298469877
222+ let $acc11008510116 = hasMoreVotes($acc01008510116, $list1008510116[0])
223+ if (($size1008510116 == 1))
224+ then $acc11008510116
224225 else {
225- let $acc398469877 = hasMoreVotes($acc298469877, $list98469877[2])
226- throw("List size exceed 2")
226+ let $acc21008510116 = hasMoreVotes($acc11008510116, $list1008510116[1])
227+ if (($size1008510116 == 2))
228+ then $acc21008510116
229+ else {
230+ let $acc31008510116 = hasMoreVotes($acc21008510116, $list1008510116[2])
231+ throw("List size exceed 2")
232+ }
227233 }
228234 }
229235 }
230- }
231- let listKey = (("tasks_" + taskId) + "_applicants")
232- let applicantsList = split(getStringValue(this, listKey), ";")
233- let teamIdentifier = applicantsList[chosenTeamId]
234- WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")])
236+ let teamIdentifier = applicantsList[chosenTeamId]
237+ WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")])
238+ }
235239 }
236240 }
237241
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let QUORUM = 50
55
66 func tryGetInteger (key) = {
77 let val = match getInteger(this, key) {
88 case b: Int =>
99 b
1010 case _ =>
1111 0
1212 }
1313 val
1414 }
1515
1616
1717 func tryGetString (key) = {
1818 let val = match getString(this, key) {
1919 case b: String =>
2020 b
2121 case _ =>
2222 ""
2323 }
2424 val
2525 }
2626
2727
2828 func isOwner (address) = (address == this)
2929
3030
3131 func getGroup () = {
3232 let val = match getString(this, "working_group") {
3333 case b: String =>
3434 b
3535 case _ =>
3636 ""
3737 }
3838 val
3939 }
4040
4141
4242 func getMembers () = {
4343 let val = match getString(this, "dao_members") {
4444 case b: String =>
4545 b
4646 case _ =>
4747 ""
4848 }
4949 val
5050 }
5151
5252
5353 func isGroupMember (a) = (tryGetInteger((("working_group_member_" + toString(a)) + "_weight")) > 0)
5454
5555
5656 func canMemberVote (i) = (tryGetInteger((("dao_member_" + toString(i.caller)) + "_weight")) > 0)
5757
5858
5959 @Callable(i)
6060 func addDAOMember (memberAddress) = if (!(isOwner(i.caller)))
6161 then throw("access only to the DAO owner")
6262 else {
6363 let group = getMembers()
6464 let newGroup = ((group + ";") + memberAddress)
6565 let groupSize = tryGetInteger("dao_size")
6666 let newGroupSize = (groupSize + 1)
6767 WriteSet([DataEntry("dao_members", newGroup), DataEntry("dao_size", newGroupSize), DataEntry((("dao_member_" + memberAddress) + "_weight"), 1)])
6868 }
6969
7070
7171
7272 @Callable(i)
7373 func addGroupMember (memberAddress) = if (!(isOwner(i.caller)))
7474 then throw("access only to the DAO owner")
7575 else {
7676 let group = getGroup()
7777 let newGroup = ((group + ";") + memberAddress)
7878 let groupSize = tryGetInteger("working_group_size")
7979 let newGroupSize = (groupSize + 1)
8080 WriteSet([DataEntry("working_group_name", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
8181 }
8282
8383
8484
8585 @Callable(i)
8686 func addTask (title) = if (!(isGroupMember(i.caller)))
8787 then throw("grants working group access only")
8888 else WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title)])
8989
9090
9191
9292 @Callable(i)
9393 func addTaskDetails (taskId) = if (!(isGroupMember(i.caller)))
9494 then throw("grants working group access only")
9595 else {
9696 let reward = extract(i.payment).amount
9797 WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward), DataEntry((("tasks_" + taskId) + "_status"), "proposed")])
9898 }
9999
100100
101101
102102 @Callable(i)
103103 func voteForTaskProposal (taskId,voteValue) = if (!(canMemberVote(i)))
104104 then throw("you can't vote")
105105 else if ((getStringValue(this, (("tasks_" + taskId) + "_status")) != "proposed"))
106106 then throw("voting is closed or not started")
107107 else if (if ((voteValue != -1))
108108 then (voteValue != 1)
109109 else false)
110110 then throw("you need to vote 1 or -1")
111111 else {
112112 let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller))
113113 let previousVote = tryGetInteger(voteKey)
114114 if (!((previousVote == 0)))
115115 then throw("you have already voted")
116116 else {
117117 let votingKey = (("tasks_" + taskId) + "_voting_state")
118118 let votingState = tryGetInteger(votingKey)
119119 let votesAmountKey = (("tasks_" + taskId) + "_voting_amount")
120120 let votesAmountState = (tryGetInteger(votingKey) + 1)
121121 let newVotingState = (votingState + voteValue)
122- WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)])
122+ ScriptResult(WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)]), TransferSet([ScriptTransfer(i.caller, 500000, unit)]))
123123 }
124124 }
125125
126126
127127
128128 @Callable(i)
129129 func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / tryGetInteger("dao_size"))))
130130 then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting"))
131131 else if (!(isGroupMember(i.caller)))
132132 then throw("grants working group access only")
133133 else {
134134 let votingKey = (("tasks_" + taskId) + "_voting_state")
135135 let votingState = tryGetInteger(votingKey)
136136 if ((votingState > 0))
137137 then {
138138 let votingResult = "ready_to_apply"
139139 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)])
140140 }
141141 else {
142142 let votingResult = "rejected"
143143 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)])
144144 }
145145 }
146146
147147
148148
149149 @Callable(i)
150150 func applyForTask (taskId,teamName) = {
151151 let listKey = (("tasks_" + taskId) + "_applicants")
152152 let currentApplicantsList = tryGetString(listKey)
153153 let applicantKey = drop(toString(i.caller), 20)
154154 let newApplicantsList = ((currentApplicantsList + ";") + toString(i.caller))
155155 WriteSet([DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_name"), teamName), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_leader"), toString(i.caller)), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_id"), applicantKey), DataEntry(listKey, newApplicantsList)])
156156 }
157157
158158
159159
160160 @Callable(i)
161161 func voteForApplicant (taskId,teamIdentifier,voteValue) = if (!(canMemberVote(i)))
162162 then throw("you can't vote")
163163 else {
164164 let voteHash = (drop(toString(i.caller), 10) + drop(teamIdentifier, 10))
165165 let voteKey = ((("tasks_" + taskId) + "_vote_") + voteHash)
166166 let vote = tryGetInteger(voteKey)
167167 if ((vote != 0))
168168 then throw("you have already voted on this team")
169169 else {
170170 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
171171 let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_score")
172172 let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey))
173173 let newTeamScore = (voteValue + tryGetInteger(teamScoreKey))
174174 WriteSet([DataEntry(voteKey, voteValue), DataEntry(teamScoreKey, newTeamScore)])
175175 }
176176 }
177177
178178
179179
180180 @Callable(i)
181181 func finishApplicantsVoting (taskId) = {
182182 func isApplicantVotedEnough (aid,aid2) = {
183183 let listKey = (("tasks_" + taskId) + "_applicants")
184184 let applicantsList = split(getStringValue(this, listKey), ";")
185185 let teamIdentifier = applicantsList[aid]
186186 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
187187 let teamVotesAmount = tryGetInteger(teamVotesAmountKey)
188188 if ((teamVotesAmount > 0))
189189 then 1
190190 else throw(("not enough votes to make decision on " + teamIdentifier))
191191 }
192192
193193 func hasMoreVotes (aid,aid2) = {
194194 let listKey = (("tasks_" + taskId) + "_applicants")
195195 let applicantsList = split(getStringValue(this, listKey), ";")
196196 let teamIdentifier = applicantsList[aid]
197197 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
198198 let teamVotesAmount = tryGetInteger(teamVotesAmountKey)
199199 let team2Identifier = applicantsList[aid2]
200200 let team2VotesAmountKey = (((("tasks_" + taskId) + "_app_") + team2Identifier) + "_votes")
201201 let team2VotesAmount = tryGetInteger(team2VotesAmountKey)
202202 if ((teamVotesAmount > team2VotesAmount))
203203 then aid
204204 else aid2
205205 }
206206
207207 if (!(isGroupMember(i.caller)))
208208 then throw("grants working group access only")
209209 else {
210- let chosenTeamId = {
211- let $list98469877 = [0, 1]
212- let $size98469877 = size($list98469877)
213- let $acc098469877 = 0
214- if (($size98469877 == 0))
215- then $acc098469877
216- else {
217- let $acc198469877 = hasMoreVotes($acc098469877, $list98469877[0])
218- if (($size98469877 == 1))
219- then $acc198469877
210+ let listKeys = tryGetString((("tasks_" + taskId) + "_applicants"))
211+ let applicantsList = split(listKeys, ";")
212+ if ((size(applicantsList) == 0))
213+ then throw("No one has yet responded to the grant")
214+ else {
215+ let chosenTeamId = {
216+ let $list1008510116 = [0, 1]
217+ let $size1008510116 = size($list1008510116)
218+ let $acc01008510116 = 0
219+ if (($size1008510116 == 0))
220+ then $acc01008510116
220221 else {
221- let $acc298469877 = hasMoreVotes($acc198469877, $list98469877[1])
222- if (($size98469877 == 2))
223- then $acc298469877
222+ let $acc11008510116 = hasMoreVotes($acc01008510116, $list1008510116[0])
223+ if (($size1008510116 == 1))
224+ then $acc11008510116
224225 else {
225- let $acc398469877 = hasMoreVotes($acc298469877, $list98469877[2])
226- throw("List size exceed 2")
226+ let $acc21008510116 = hasMoreVotes($acc11008510116, $list1008510116[1])
227+ if (($size1008510116 == 2))
228+ then $acc21008510116
229+ else {
230+ let $acc31008510116 = hasMoreVotes($acc21008510116, $list1008510116[2])
231+ throw("List size exceed 2")
232+ }
227233 }
228234 }
229235 }
230- }
231- let listKey = (("tasks_" + taskId) + "_applicants")
232- let applicantsList = split(getStringValue(this, listKey), ";")
233- let teamIdentifier = applicantsList[chosenTeamId]
234- WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")])
236+ let teamIdentifier = applicantsList[chosenTeamId]
237+ WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")])
238+ }
235239 }
236240 }
237241
238242
239243
240244 @Callable(i)
241245 func startWork (taskId) = {
242246 let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer"))
243247 if ((toString(i.caller) != getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))))
244248 then throw("team leader only")
245249 else WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_started")])
246250 }
247251
248252
249253
250254 @Callable(i)
251255 func acceptWorkResult (taskId) = if (!(isGroupMember(i.caller)))
252256 then throw("grants working group access only")
253257 else {
254258 let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward"))
255259 let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer"))
256260 let teamAddress = getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))
257261 ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)]))
258262 }
259263
260264

github/deemru/w8io/169f3d6 
42.01 ms