tx · 4vdLDyZxrHNJf6tcxDLK2NZgtD6ijXLx2BfBYxpE22C9

3Ms9uNDuJGQrtsFzhPUy4gHbHF2cHMSQQHB:  -0.01400000 Waves

2021.02.17 11:35 [1401925] smart account 3Ms9uNDuJGQrtsFzhPUy4gHbHF2cHMSQQHB > SELF 0.00000000 Waves

{ "type": 13, "id": "4vdLDyZxrHNJf6tcxDLK2NZgtD6ijXLx2BfBYxpE22C9", "fee": 1400000, "feeAssetId": null, "timestamp": 1613550985083, "version": 2, "chainId": 84, "sender": "3Ms9uNDuJGQrtsFzhPUy4gHbHF2cHMSQQHB", "senderPublicKey": "B9A4hsDDRydytRoDsyZ9hmPHfyTkyrw4k6UhgtZWqDDN", "proofs": [ "62J2836XzUtTcDh7j4JWtMFWD9oVdY95b5SYeJ9cDjfjpPFKrXc9eLjnqJoFWSiXkaGQNFMwDjyk2oRMq75CfFo2" ], "script": "base64:AAIDAAAAAAAAAC4IARIECgIICBIECgIIARIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIAAAAEgAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAAAAAAMbWFpbkNvbnRyYWN0CQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOOTdpYWN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JAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3N0YXR1cwIAAAANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfcmVwb3J0BQAAAApyZXBvcnRMaW5rBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAgZ3JhbnRzIHdvcmtpbmcgZ3JvdXAgYWNjZXNzIG9ubHkAAAAAZcezEg==", "height": 1401925, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CadNtGXRAsBkUZsoRfHTXRdGR7dQHqfftjFdZ6hsxjFr Next: none Diff:
OldNewDifferences
2525 }
2626
2727
28-let mainContract = addressFromStringValue("3NCsqf4pFGtECs3vM4j1nKqL6VA3HdiNGeZ")
28+let mainContract = addressFromStringValue("3N97iacRapbKQMwDxobcwAvNk8WSb3TPwjx")
2929
3030 func getGroup () = {
3131 let val = match getString(mainContract, "working_group_members") {
140140
141141
142142 @Callable(i)
143-func addTask (title,link) = WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_leader"), toString(i.caller))])
143+func addTask (title,link) = WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_createdAt"), lastBlock.timestamp), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_leader"), toString(i.caller))])
144144
145145
146146
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-let mainContract = addressFromStringValue("3NCsqf4pFGtECs3vM4j1nKqL6VA3HdiNGeZ")
28+let mainContract = addressFromStringValue("3N97iacRapbKQMwDxobcwAvNk8WSb3TPwjx")
2929
3030 func getGroup () = {
3131 let val = match getString(mainContract, "working_group_members") {
3232 case b: String =>
3333 b
3434 case _ =>
3535 ""
3636 }
3737 val
3838 }
3939
4040
4141 func getMembers () = {
4242 let val = match getString(mainContract, "dao_members") {
4343 case b: String =>
4444 b
4545 case _ =>
4646 ""
4747 }
4848 val
4949 }
5050
5151
5252 func getDAOSize () = {
5353 let val = match getInteger(mainContract, "dao_size") {
5454 case b: Int =>
5555 b
5656 case _ =>
5757 0
5858 }
5959 val
6060 }
6161
6262
6363 func isGroupMember (a) = {
6464 let val = match getInteger(mainContract, (("working_group_member_" + toString(a)) + "_weight")) {
6565 case b: Int =>
6666 b
6767 case _ =>
6868 0
6969 }
7070 (val > 0)
7171 }
7272
7373
7474 func canMemberVote (i) = {
7575 let val = match getInteger(mainContract, (("dao_member_" + toString(i.caller)) + "_weight")) {
7676 case b: Int =>
7777 b
7878 case _ =>
7979 0
8080 }
8181 (val > 0)
8282 }
8383
8484
8585 func isVotingDisable (taskId) = (tryGetString((("tasks_" + taskId) + "_status")) != "voting_started")
8686
8787
8888 func isQuorumAchieved (taskId) = (QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / getDAOSize()))
8989
9090
9191 func getVoteValue (s) = if ((s == "like"))
9292 then 1
9393 else if ((s == "dislike"))
9494 then -1
9595 else throw("you need to vote with 'like' or 'dislike' value")
9696
9797
9898 func initTaskVotingConditions (taskId,address) = if (!(isGroupMember(address)))
9999 then throw("grants working group access only")
100100 else if ((tryGetString((("tasks_" + taskId) + "_status")) != ""))
101101 then throw("task is not new")
102102 else true
103103
104104
105105 func startWorkConditions (taskId,address) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "approved"))
106106 then throw("the task is not approved")
107107 else if ((toString(address) != tryGetString((("tasks_" + taskId) + "_leader"))))
108108 then throw("team leader only")
109109 else true
110110
111111
112112 func addRewardConditions (taskId,reward,address) = if ((tryGetString((("tasks_" + taskId) + "_status")) != ""))
113113 then throw("voting was already started, so the reward amount cannot be changed")
114114 else if ((toString(address) != tryGetString((("tasks_" + taskId) + "_leader"))))
115115 then throw("team leader only")
116116 else true
117117
118118
119119 func voteForTaskProposalConditions (taskId,i) = if (!(canMemberVote(i)))
120120 then throw("you can't vote")
121121 else if (isVotingDisable(taskId))
122122 then throw("voting is closed or not started")
123123 else if (!((tryGetInteger(((("tasks_" + taskId) + "_voted_") + toString(i.caller))) == 0)))
124124 then throw("you have already voted")
125125 else true
126126
127127
128128 func finishTaskProposalVotingConditions (taskId,address) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "voting_started"))
129129 then throw("voting is not active")
130130 else if (isQuorumAchieved(taskId))
131131 then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting"))
132132 else if (!(isGroupMember(address)))
133133 then throw("grants working group access only")
134134 else true
135135
136136
137137 func acceptWorkResultConditions (address) = if (!(isGroupMember(address)))
138138 then throw("grants working group access only")
139139 else true
140140
141141
142142 @Callable(i)
143-func addTask (title,link) = WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_leader"), toString(i.caller))])
143+func addTask (title,link) = WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_createdAt"), lastBlock.timestamp), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_leader"), toString(i.caller))])
144144
145145
146146
147147 @Callable(i)
148148 func addReward (taskId,reward) = if (addRewardConditions(taskId, reward, i.caller))
149149 then WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward)])
150150 else throw("checks are not passed")
151151
152152
153153
154154 @Callable(i)
155155 func initTaskVoting (taskId) = if (initTaskVotingConditions(taskId, i.caller))
156156 then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "voting_started")])
157157 else throw("checks are not passed")
158158
159159
160160
161161 @Callable(i)
162162 func voteForTaskProposal (taskId,voteValueString) = if (voteForTaskProposalConditions(taskId, i))
163163 then {
164164 let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller))
165165 let votingKey = (("tasks_" + taskId) + "_voting_state")
166166 let votesAmountKey = (("tasks_" + taskId) + "_voting_amount")
167167 let voteValue = getVoteValue(voteValueString)
168168 let votingState = tryGetInteger(votingKey)
169169 let votesAmountState = (tryGetInteger(votesAmountKey) + 1)
170170 WriteSet([DataEntry(votingKey, (votingState + voteValue)), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)])
171171 }
172172 else throw("checks are not passed")
173173
174174
175175
176176 @Callable(i)
177177 func finishTaskProposalVoting (taskId) = if (finishTaskProposalVotingConditions(taskId, i.caller))
178178 then {
179179 let statusKey = (("tasks_" + taskId) + "_status")
180180 let votingKey = (("tasks_" + taskId) + "_voting_state")
181181 WriteSet([DataEntry(statusKey, if ((tryGetInteger(votingKey) > 0))
182182 then "approved"
183183 else "rejected")])
184184 }
185185 else throw("checks are not passed")
186186
187187
188188
189189 @Callable(i)
190190 func startWork (taskId) = if (startWorkConditions(taskId, i.caller))
191191 then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started")])
192192 else throw("checks are not passed")
193193
194194
195195
196196 @Callable(i)
197197 func rejectTask (taskId) = if (isGroupMember(i.caller))
198198 then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected")])
199199 else throw("grants working group access only")
200200
201201
202202
203203 @Callable(i)
204204 func acceptWorkResult (taskId,reportLink) = if (acceptWorkResultConditions(i.caller))
205205 then {
206206 let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward"))
207207 let teamAddress = getStringValue(this, (("tasks_" + taskId) + "_leader"))
208208 ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((("tasks_" + taskId) + "_report"), reportLink)]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)]))
209209 }
210210 else throw("grants working group access only")
211211
212212

github/deemru/w8io/026f985 
55.06 ms