tx · FFUiSeMjjF2chK26uaofxuRkrM1cjqgLbUCcFWmbkyzk

3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2:  -0.01400000 Waves

2020.11.20 00:59 [1272808] smart account 3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2 > SELF 0.00000000 Waves

{ "type": 13, "id": "FFUiSeMjjF2chK26uaofxuRkrM1cjqgLbUCcFWmbkyzk", "fee": 1400000, "feeAssetId": null, "timestamp": 1605823240793, "version": 2, "chainId": 84, "sender": "3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2", "senderPublicKey": "3dxKqzB5AWentnFkyzLnbnRfN2iRWgE7Q4paMwfi9MoT", "proofs": [ "2caoeheZK6LRdh2qLwJ2HaNX5v3h5EW2aAew6ZpWrMqgJTbd9bNWtiihibevjYAv3i2Es4HSZRG57DkyEsuE7T3d" ], "script": "base64:AAIDAAAAAAAAAEYIARIDCgEIEgMKAQgSBAoCCAgSBAoCCAgSBAoCCAESAwoBCBIFCgMICAgSBQoDCAgBEgMKAQgSAwoBCBIDCgEIEgQKAggIAAAACAAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAHaXNPd25lcgAAAAEAAAAHYWRkcmVzcwkAAAAAAAACBQAAAAdhZGRyZXNzBQAAAAR0aGlzAQA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AEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAADnRlYW1JZGVudGlmaWVyAgAAAAdfbGVhZGVyCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfc3RhdHVzAgAAAA13b3JrX2ZpbmlzaGVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAVfYXBwXwUAAAAOdGVhbUlkZW50aWZpZXICAAAACF9wcm9jZXNzAgAAAA13b3JrX2ZpbmlzaGVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAVfYXBwXwUAAAAOdGVhbUlkZW50aWZpZXICAAAAB19yZXBvcnQFAAAACnJlcG9ydExpbmsFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAC3RlYW1BZGRyZXNzBQAAAAxyZXdhcmRBbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAADjst7E", "height": 1272808, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5TpwqYSbWw3yrqV8taWPud8oKtC3j97perB4hoVJHTCt Next: none Diff:
OldNewDifferences
2929
3030
3131 func getGroup () = {
32- let val = match getString(this, "working_group") {
32+ let val = match getString(this, "working_group_members") {
3333 case b: String =>
3434 b
3535 case _ =>
8181 let newGroup = ((group + ";") + memberAddress)
8282 let groupSize = tryGetInteger("working_group_size")
8383 let newGroupSize = (groupSize + 1)
84- WriteSet([DataEntry("working_group_name", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
84+ WriteSet([DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
8585 }
8686
8787
222222 then throw("No one has yet responded to the grant")
223223 else {
224224 let chosenTeamId = {
225- let $list1113111162 = [0, 1]
226- let $size1113111162 = size($list1113111162)
227- let $acc01113111162 = 0
228- if (($size1113111162 == 0))
229- then $acc01113111162
225+ let $list1114511176 = [0, 1]
226+ let $size1114511176 = size($list1114511176)
227+ let $acc01114511176 = 0
228+ if (($size1114511176 == 0))
229+ then $acc01114511176
230230 else {
231- let $acc11113111162 = hasMoreVotes($acc01113111162, $list1113111162[0])
232- if (($size1113111162 == 1))
233- then $acc11113111162
231+ let $acc11114511176 = hasMoreVotes($acc01114511176, $list1114511176[0])
232+ if (($size1114511176 == 1))
233+ then $acc11114511176
234234 else {
235- let $acc21113111162 = hasMoreVotes($acc11113111162, $list1113111162[1])
236- if (($size1113111162 == 2))
237- then $acc21113111162
235+ let $acc21114511176 = hasMoreVotes($acc11114511176, $list1114511176[1])
236+ if (($size1114511176 == 2))
237+ then $acc21114511176
238238 else {
239- let $acc31113111162 = hasMoreVotes($acc21113111162, $list1113111162[2])
239+ let $acc31114511176 = hasMoreVotes($acc21114511176, $list1114511176[2])
240240 throw("List size exceed 2")
241241 }
242242 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let QUORUM = 1
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 () = {
32- let val = match getString(this, "working_group") {
32+ let val = match getString(this, "working_group_members") {
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 if ((tryGetInteger((("dao_member_" + memberAddress) + "_weight")) == 1))
6363 then throw("This user already exists")
6464 else {
6565 let group = getMembers()
6666 let newGroup = ((group + ";") + memberAddress)
6767 let groupSize = tryGetInteger("dao_size")
6868 let newGroupSize = (groupSize + 1)
6969 WriteSet([DataEntry("dao_members", newGroup), DataEntry("dao_size", newGroupSize), DataEntry((("dao_member_" + memberAddress) + "_weight"), 1)])
7070 }
7171
7272
7373
7474 @Callable(i)
7575 func addGroupMember (memberAddress) = if (!(isOwner(i.caller)))
7676 then throw("access only to the DAO owner")
7777 else if ((tryGetInteger((("working_group_member_" + memberAddress) + "_weight")) == 1))
7878 then throw("This user already exists")
7979 else {
8080 let group = getGroup()
8181 let newGroup = ((group + ";") + memberAddress)
8282 let groupSize = tryGetInteger("working_group_size")
8383 let newGroupSize = (groupSize + 1)
84- WriteSet([DataEntry("working_group_name", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
84+ WriteSet([DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
8585 }
8686
8787
8888
8989 @Callable(i)
9090 func addTask (title,link) = if (!(isGroupMember(i.caller)))
9191 then throw("grants working group access only")
9292 else WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link)])
9393
9494
9595
9696 @Callable(i)
9797 func addTaskDetails (taskId,detailsLink) = if (!(isGroupMember(i.caller)))
9898 then throw("grants working group access only")
9999 else {
100100 let reward = extract(i.payment).amount
101101 WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward), DataEntry((("tasks_" + taskId) + "_details"), detailsLink), DataEntry((("tasks_" + taskId) + "_status"), "proposed")])
102102 }
103103
104104
105105
106106 @Callable(i)
107107 func voteForTaskProposal (taskId,voteValue) = if (!(canMemberVote(i)))
108108 then throw("you can't vote")
109109 else if ((getStringValue(this, (("tasks_" + taskId) + "_status")) != "proposed"))
110110 then throw("voting is closed or not started")
111111 else if (if ((voteValue != -1))
112112 then (voteValue != 1)
113113 else false)
114114 then throw("you need to vote 1 or -1")
115115 else {
116116 let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller))
117117 let previousVote = tryGetInteger(voteKey)
118118 if (!((previousVote == 0)))
119119 then throw("you have already voted")
120120 else {
121121 let votingKey = (("tasks_" + taskId) + "_voting_state")
122122 let votingState = tryGetInteger(votingKey)
123123 let votesAmountKey = (("tasks_" + taskId) + "_voting_amount")
124124 let votesAmountState = (tryGetInteger(votingKey) + 1)
125125 let newVotingState = (votingState + voteValue)
126126 ScriptResult(WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)]), TransferSet([ScriptTransfer(i.caller, 500000, unit)]))
127127 }
128128 }
129129
130130
131131
132132 @Callable(i)
133133 func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / tryGetInteger("dao_size"))))
134134 then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting"))
135135 else if (!(isGroupMember(i.caller)))
136136 then throw("grants working group access only")
137137 else {
138138 let votingKey = (("tasks_" + taskId) + "_voting_state")
139139 let votingState = tryGetInteger(votingKey)
140140 if ((votingState > 0))
141141 then {
142142 let votingResult = "ready_to_apply"
143143 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)])
144144 }
145145 else {
146146 let votingResult = "rejected"
147147 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)])
148148 }
149149 }
150150
151151
152152
153153 @Callable(i)
154154 func applyForTask (taskId,teamName,link) = {
155155 let status = tryGetString((("tasks_" + taskId) + "_status"))
156156 if ((status != "ready_to_apply"))
157157 then throw("This grant has not yet been approved")
158158 else {
159159 let listKey = (("tasks_" + taskId) + "_applicants")
160160 let currentApplicantsList = tryGetString(listKey)
161161 let applicantKey = drop(toString(i.caller), 10)
162162 let newApplicantsList = ((currentApplicantsList + ";") + toString(i.caller))
163163 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)])
164164 }
165165 }
166166
167167
168168
169169 @Callable(i)
170170 func voteForApplicant (taskId,teamIdentifier,voteValue) = if (!(canMemberVote(i)))
171171 then throw("you can't vote")
172172 else {
173173 let voteHash = (drop(toString(i.caller), 10) + drop(teamIdentifier, 10))
174174 let voteKey = ((("tasks_" + taskId) + "_vote_") + voteHash)
175175 let vote = tryGetInteger(voteKey)
176176 if ((vote != 0))
177177 then throw("you have already voted on this team")
178178 else {
179179 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
180180 let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_score")
181181 let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey))
182182 let newTeamScore = (voteValue + tryGetInteger(teamScoreKey))
183183 WriteSet([DataEntry(voteKey, voteValue), DataEntry(teamScoreKey, newTeamScore)])
184184 }
185185 }
186186
187187
188188
189189 @Callable(i)
190190 func finishApplicantsVoting (taskId) = {
191191 func isApplicantVotedEnough (aid,aid2) = {
192192 let listKey = (("tasks_" + taskId) + "_applicants")
193193 let applicantsList = split(getStringValue(this, listKey), ";")
194194 let teamIdentifier = applicantsList[aid]
195195 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
196196 let teamVotesAmount = tryGetInteger(teamVotesAmountKey)
197197 if ((teamVotesAmount > 0))
198198 then 1
199199 else throw(("not enough votes to make decision on " + teamIdentifier))
200200 }
201201
202202 func hasMoreVotes (aid,aid2) = {
203203 let listKey = (("tasks_" + taskId) + "_applicants")
204204 let applicantsList = split(getStringValue(this, listKey), ";")
205205 let teamIdentifier = applicantsList[aid]
206206 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
207207 let teamVotesAmount = tryGetInteger(teamVotesAmountKey)
208208 let team2Identifier = applicantsList[aid2]
209209 let team2VotesAmountKey = (((("tasks_" + taskId) + "_app_") + team2Identifier) + "_votes")
210210 let team2VotesAmount = tryGetInteger(team2VotesAmountKey)
211211 if ((teamVotesAmount > team2VotesAmount))
212212 then aid
213213 else aid2
214214 }
215215
216216 if (!(isGroupMember(i.caller)))
217217 then throw("grants working group access only")
218218 else {
219219 let listKeys = tryGetString((("tasks_" + taskId) + "_applicants"))
220220 let applicantsList = split(listKeys, ";")
221221 if ((size(applicantsList) == 0))
222222 then throw("No one has yet responded to the grant")
223223 else {
224224 let chosenTeamId = {
225- let $list1113111162 = [0, 1]
226- let $size1113111162 = size($list1113111162)
227- let $acc01113111162 = 0
228- if (($size1113111162 == 0))
229- then $acc01113111162
225+ let $list1114511176 = [0, 1]
226+ let $size1114511176 = size($list1114511176)
227+ let $acc01114511176 = 0
228+ if (($size1114511176 == 0))
229+ then $acc01114511176
230230 else {
231- let $acc11113111162 = hasMoreVotes($acc01113111162, $list1113111162[0])
232- if (($size1113111162 == 1))
233- then $acc11113111162
231+ let $acc11114511176 = hasMoreVotes($acc01114511176, $list1114511176[0])
232+ if (($size1114511176 == 1))
233+ then $acc11114511176
234234 else {
235- let $acc21113111162 = hasMoreVotes($acc11113111162, $list1113111162[1])
236- if (($size1113111162 == 2))
237- then $acc21113111162
235+ let $acc21114511176 = hasMoreVotes($acc11114511176, $list1114511176[1])
236+ if (($size1114511176 == 2))
237+ then $acc21114511176
238238 else {
239- let $acc31113111162 = hasMoreVotes($acc21113111162, $list1113111162[2])
239+ let $acc31114511176 = hasMoreVotes($acc21114511176, $list1114511176[2])
240240 throw("List size exceed 2")
241241 }
242242 }
243243 }
244244 }
245245 let teamIdentifier = applicantsList[chosenTeamId]
246246 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")])
247247 }
248248 }
249249 }
250250
251251
252252
253253 @Callable(i)
254254 func startWork (taskId) = {
255255 let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer"))
256256 if ((toString(i.caller) != getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))))
257257 then throw("team leader only")
258258 else WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_started")])
259259 }
260260
261261
262262
263263 @Callable(i)
264264 func rejectTask (taskId) = if (!(isGroupMember(i.caller)))
265265 then throw("grants working group access only")
266266 else {
267267 let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer"))
268268 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "rejected")])
269269 }
270270
271271
272272
273273 @Callable(i)
274274 func acceptWorkResult (taskId,reportLink) = if (!(isGroupMember(i.caller)))
275275 then throw("grants working group access only")
276276 else {
277277 let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward"))
278278 let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer"))
279279 let teamAddress = getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))
280280 ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_report"), reportLink)]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)]))
281281 }
282282
283283

github/deemru/w8io/026f985 
64.99 ms