tx · 8VEnZrdBny6vMin5Eq8EsZ2q8C8Vg6f4X7GKpEmN4wTx

3N2sQRGTRmL9NGZVVtzhfBEjEyVR7S9Mkum:  -0.10000000 Waves

2020.12.21 13:53 [1318358] smart account 3N2sQRGTRmL9NGZVVtzhfBEjEyVR7S9Mkum > SELF 0.00000000 Waves

{ "type": 13, "id": "8VEnZrdBny6vMin5Eq8EsZ2q8C8Vg6f4X7GKpEmN4wTx", "fee": 10000000, "feeAssetId": null, "timestamp": 1608547992157, "version": 2, "chainId": 84, "sender": "3N2sQRGTRmL9NGZVVtzhfBEjEyVR7S9Mkum", "senderPublicKey": "J8SeDz97kvV9MTtzmwVB965Dz8iEWst5MzMzgUgG1dfK", "proofs": [ "4RFdPwCYhBBYZ52vLfUWuTDZusGw66PgJSDAmSL5NAtxGVRHur3TDPvncpwtRPvHCuW3MPShR3snLcDUGkf4Uqyi" ], "script": "base64:AAIDAAAAAAAAAE8IARIECgIICBIDCgEIEgQKAggBEgMKAQgSBQoDCAgIEgUKAwgIARIDCgEIEgQKAggIEgQKAggIEgMKAQgSBQoDCAgBEgUKAwgICBIDCgEIAAAACQAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAAAAAAMbWFpbkNvbnRyYWN0CQEAAAAcQGV4dHJVc2VyKGFkZH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R1cwIAAAANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAAEHdpbm5lcklkZW50aWZpZXICAAAACF9wcm9jZXNzAgAAAAZ3aW5uZXIJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3JlcG9ydAUAAAAKcmVwb3J0TGluawUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAALdGVhbUFkZHJlc3MFAAAADHJld2FyZEFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAWkBAAAACnJlamVjdFRhc2sAAAABAAAABnRhc2tJZAMJAQAAAAEhAAAAAQkBAAAADWlzR3JvdXBNZW1iZXIAAAABCAUAAAABaQAAAAZjYWxsZXIJAAACAAAAAQIAAAAgZ3JhbnRzIHdvcmtpbmcgZ3JvdXAgYWNjZXNzIG9ubHkJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3N0YXR1cwIAAAAIcmVqZWN0ZWQFAAAAA25pbAAAAAAZjSFD", "height": 1318358, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Wk5rug8WN98oiwLDUzeCbDo3r1nzqVWZE184zbpCHhT Next: E1qNSWYDUdhaLuwfofTDd79Pva7CiJyPM6NH8wuyfXsi Diff:
OldNewDifferences
2525 }
2626
2727
28-func isOwner (address) = (address == this)
29-
28+let mainContract = addressFromStringValue("3NCsqf4pFGtECs3vM4j1nKqL6VA3HdiNGeZ")
3029
3130 func getGroup () = {
32- let val = match getString(this, "working_group_members") {
31+ let val = match getString(mainContract, "working_group_members") {
3332 case b: String =>
3433 b
3534 case _ =>
4039
4140
4241 func getMembers () = {
43- let val = match getString(this, "dao_members") {
42+ let val = match getString(mainContract, "dao_members") {
4443 case b: String =>
4544 b
4645 case _ =>
5049 }
5150
5251
53-func isGroupMember (a) = (tryGetInteger((("working_group_member_" + toString(a)) + "_weight")) > 0)
52+func getDAOSize () = {
53+ let val = match getInteger(mainContract, "dao_size") {
54+ case b: Int =>
55+ b
56+ case _ =>
57+ 0
58+ }
59+ val
60+ }
5461
5562
56-func canMemberVote (i) = (tryGetInteger((("dao_member_" + toString(i.caller)) + "_weight")) > 0)
63+func isGroupMember (a) = {
64+ let val = match getInteger(mainContract, (("working_group_member_" + toString(a)) + "_weight")) {
65+ case b: Int =>
66+ b
67+ case _ =>
68+ 0
69+ }
70+ (val > 0)
71+ }
5772
5873
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_members", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
85- }
86-
74+func canMemberVote (i) = {
75+ let val = match getInteger(mainContract, (("dao_member_" + toString(i.caller)) + "_weight")) {
76+ case b: Int =>
77+ b
78+ case _ =>
79+ 0
80+ }
81+ (val > 0)
82+ }
8783
8884
8985 @Callable(i)
130126
131127
132128 @Callable(i)
133-func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / tryGetInteger("dao_size"))))
129+func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / getDAOSize())))
134130 then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting"))
135131 else if (!(isGroupMember(i.caller)))
136132 then throw("grants working group access only")
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
28-func isOwner (address) = (address == this)
29-
28+let mainContract = addressFromStringValue("3NCsqf4pFGtECs3vM4j1nKqL6VA3HdiNGeZ")
3029
3130 func getGroup () = {
32- let val = match getString(this, "working_group_members") {
31+ let val = match getString(mainContract, "working_group_members") {
3332 case b: String =>
3433 b
3534 case _ =>
3635 ""
3736 }
3837 val
3938 }
4039
4140
4241 func getMembers () = {
43- let val = match getString(this, "dao_members") {
42+ let val = match getString(mainContract, "dao_members") {
4443 case b: String =>
4544 b
4645 case _ =>
4746 ""
4847 }
4948 val
5049 }
5150
5251
53-func isGroupMember (a) = (tryGetInteger((("working_group_member_" + toString(a)) + "_weight")) > 0)
52+func getDAOSize () = {
53+ let val = match getInteger(mainContract, "dao_size") {
54+ case b: Int =>
55+ b
56+ case _ =>
57+ 0
58+ }
59+ val
60+ }
5461
5562
56-func canMemberVote (i) = (tryGetInteger((("dao_member_" + toString(i.caller)) + "_weight")) > 0)
63+func isGroupMember (a) = {
64+ let val = match getInteger(mainContract, (("working_group_member_" + toString(a)) + "_weight")) {
65+ case b: Int =>
66+ b
67+ case _ =>
68+ 0
69+ }
70+ (val > 0)
71+ }
5772
5873
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_members", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
85- }
86-
74+func canMemberVote (i) = {
75+ let val = match getInteger(mainContract, (("dao_member_" + toString(i.caller)) + "_weight")) {
76+ case b: Int =>
77+ b
78+ case _ =>
79+ 0
80+ }
81+ (val > 0)
82+ }
8783
8884
8985 @Callable(i)
9086 func addTask (title,link) = if (!(isGroupMember(i.caller)))
9187 then throw("grants working group access only")
9288 else WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link)])
9389
9490
9591
9692 @Callable(i)
9793 func addReward (taskId) = if (!(isGroupMember(i.caller)))
9894 then throw("grants working group access only")
9995 else {
10096 let reward = extract(i.payment).amount
10197 WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward), DataEntry((("tasks_" + taskId) + "_status"), "proposed")])
10298 }
10399
104100
105101
106102 @Callable(i)
107103 func voteForTaskProposal (taskId,voteValue) = if (!(canMemberVote(i)))
108104 then throw("you can't vote")
109105 else if ((getStringValue(this, (("tasks_" + taskId) + "_status")) != "proposed"))
110106 then throw("voting is closed or not started")
111107 else if (if ((voteValue != -1))
112108 then (voteValue != 1)
113109 else false)
114110 then throw("you need to vote 1 or -1")
115111 else {
116112 let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller))
117113 let previousVote = tryGetInteger(voteKey)
118114 if (!((previousVote == 0)))
119115 then throw("you have already voted")
120116 else {
121117 let votingKey = (("tasks_" + taskId) + "_voting_state")
122118 let votingState = tryGetInteger(votingKey)
123119 let votesAmountKey = (("tasks_" + taskId) + "_voting_amount")
124120 let votesAmountState = (tryGetInteger(votingKey) + 1)
125121 let newVotingState = (votingState + voteValue)
126122 ScriptResult(WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)]), TransferSet([ScriptTransfer(i.caller, 500000, unit)]))
127123 }
128124 }
129125
130126
131127
132128 @Callable(i)
133-func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / tryGetInteger("dao_size"))))
129+func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / getDAOSize())))
134130 then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting"))
135131 else if (!(isGroupMember(i.caller)))
136132 then throw("grants working group access only")
137133 else {
138134 let votingKey = (("tasks_" + taskId) + "_voting_state")
139135 let votingState = tryGetInteger(votingKey)
140136 if ((votingState > 0))
141137 then {
142138 let votingResult = "ready_to_apply"
143139 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)])
144140 }
145141 else {
146142 let votingResult = "rejected"
147143 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)])
148144 }
149145 }
150146
151147
152148
153149 @Callable(i)
154150 func applyForTask (taskId,teamName,link) = {
155151 let status = tryGetString((("tasks_" + taskId) + "_status"))
156152 if ((status != "ready_to_apply"))
157153 then throw("This grant has not yet been approved")
158154 else {
159155 let listKey = (("tasks_" + taskId) + "_applicants")
160156 let currentApplicantsList = tryGetString(listKey)
161157 let applicantKey = drop(toString(i.caller), 10)
162158 let leader = toString(i.caller)
163159 let newApplicantsList = ((currentApplicantsList + ";") + leader)
164160 WriteSet([DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_name"), teamName), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_link"), link), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_leader"), leader), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_id"), applicantKey), DataEntry(listKey, newApplicantsList)])
165161 }
166162 }
167163
168164
169165
170166 @Callable(i)
171167 func voteForApplicant (taskId,teamIdentifier,voteValue) = if (!(canMemberVote(i)))
172168 then throw("you can't vote")
173169 else {
174170 let voteHash = (drop(toString(i.caller), 10) + drop(teamIdentifier, 10))
175171 let voteKey = ((("tasks_" + taskId) + "_vote_") + voteHash)
176172 let vote = tryGetInteger(voteKey)
177173 if ((vote != 0))
178174 then throw("you have already voted on this team")
179175 else {
180176 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
181177 let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_score")
182178 let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey))
183179 let newTeamScore = (voteValue + tryGetInteger(teamScoreKey))
184180 WriteSet([DataEntry(voteKey, voteValue), DataEntry(teamScoreKey, newTeamScore)])
185181 }
186182 }
187183
188184
189185
190186 @Callable(i)
191187 func finishApplicantsVoting (taskId) = {
192188 let minVotesToApproveApplicant = 1
193189 if (!(isGroupMember(i.caller)))
194190 then throw("grants working group access only")
195191 else {
196192 let listKeys = tryGetString((("tasks_" + taskId) + "_applicants"))
197193 let applicantsList = split(listKeys, ";")
198194 if ((size(applicantsList) == 0))
199195 then throw("No one has applied to the hackathon, yet")
200196 else WriteSet([DataEntry((("tasks_" + taskId) + "_performer"), listKeys), DataEntry((("tasks_" + taskId) + "_status"), "ready_to_submit")])
201197 }
202198 }
203199
204200
205201
206202 @Callable(i)
207203 func enableSubmissions (taskId,juryList) = if (!(isGroupMember(i.caller)))
208204 then throw("grants working group access only")
209205 else WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started"), DataEntry((("tasks_" + taskId) + "_jury"), juryList)])
210206
211207
212208
213209 @Callable(i)
214210 func submitSolution (taskId,solutionLink) = {
215211 func areSubmissionsEnabled (taskId) = (tryGetString((("tasks_" + taskId) + "_status")) == "work_started")
216212
217213 let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer"))
218214 if (!(areSubmissionsEnabled(taskId)))
219215 then throw("not possible to upload solution now")
220216 else if ((toString(i.caller) != getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))))
221217 then throw("team leader only")
222218 else WriteSet([DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_submitted"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_solution"), solutionLink)])
223219 }
224220
225221
226222
227223 @Callable(i)
228224 func stopSubmissions (taskId) = if (!(isGroupMember(i.caller)))
229225 then throw("grants working group access only")
230226 else WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished")])
231227
232228
233229
234230 @Callable(i)
235231 func voteForSolution (taskId,teamIdentifier,voteValue) = {
236232 func isJuryMember (i,taskId) = true
237233
238234 if (!(isJuryMember(i, taskId)))
239235 then throw("you can't vote")
240236 else {
241237 let voteHash = (drop(toString(i.caller), 10) + drop(teamIdentifier, 10))
242238 let voteKey = ((("tasks_" + taskId) + "_solutionvote_") + voteHash)
243239 let vote = tryGetInteger(voteKey)
244240 if ((vote != 0))
245241 then throw("you have already voted on this solution")
246242 else {
247243 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_solutionvotes")
248244 let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_solutionscore")
249245 let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey))
250246 let newTeamScore = (voteValue + tryGetInteger(teamScoreKey))
251247 WriteSet([DataEntry(voteKey, voteValue), DataEntry(teamScoreKey, newTeamScore)])
252248 }
253249 }
254250 }
255251
256252
257253
258254 @Callable(i)
259255 func acceptWorkResult (taskId,winnerIdentifier,reportLink) = if (!(isGroupMember(i.caller)))
260256 then throw("grants working group access only")
261257 else {
262258 let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward"))
263259 let teamAddress = getStringValue(this, (((("tasks_" + taskId) + "_app_") + winnerIdentifier) + "_leader"))
264260 ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + winnerIdentifier) + "_process"), "winner"), DataEntry((("tasks_" + taskId) + "_report"), reportLink)]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)]))
265261 }
266262
267263
268264
269265 @Callable(i)
270266 func rejectTask (taskId) = if (!(isGroupMember(i.caller)))
271267 then throw("grants working group access only")
272268 else WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected")])
273269
274270

github/deemru/w8io/026f985 
43.05 ms