tx · GMbjr3i6XVMFrXVEviFyw3U1Z5s6Z8FFDuMBo2bzJJES 3MwvGedhrR64G7YX8FkeQA14hmWM2YnCk5b: -0.01800000 Waves 2024.10.03 12:06 [3310468] smart account 3MwvGedhrR64G7YX8FkeQA14hmWM2YnCk5b > SELF 0.00000000 Waves
{ "type": 13, "id": "GMbjr3i6XVMFrXVEviFyw3U1Z5s6Z8FFDuMBo2bzJJES", "fee": 1800000, "feeAssetId": null, "timestamp": 1727946435400, "version": 2, "chainId": 84, "sender": "3MwvGedhrR64G7YX8FkeQA14hmWM2YnCk5b", "senderPublicKey": "5PKbnjcxTb5GQAkmuH2EiKipvtRJDjKSsKxHVsRqLx1m", "proofs": [ "2BwDYmDXBGRakD2EsQVmHExSQXqjmERu8CZEf1zQ7Zq36SuQcwRvTFV3Xp111vJnU3CuKaui43UCqJULbj5gc4ti" ], "script": "base64:AAIFAAAAAAAAACsIAhIHCgUICAgICBIFCgMICAgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIAAAAOQEAAAAHdGhyb3dJZgAAAAIAAAAJY29uZGl0aW9uAAAABWVycm9yAwUAAAAJY29uZGl0aW9uCQAAAgAAAAEFAAAABWVycm9yBgEAAAAObm9uRW1wdHlTdHJpbmcAAAACAAAAAXMAAAADa2V5AwkAAGcAAAACAAAAAAAAAAAACQABMQAAAAEFAAAAAXMJAAACAAAAAQkAASwAAAACAgAAAA5lbXB0eSBzdHJpbmc6IAUAAAADa2V5BgEAAAALd3JpdGVTdHJpbmcAAAACAAAAA2tleQAAAAV2YWx1ZQMJAABnAAAAAgAAAAAAAAAAAAkAATEAAAABBQAAAAV2YWx1ZQkAAAIAAAABCQABLAAAAAICAAAADmVtcHR5IHN0cmluZzogBQAAAANrZXkJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAA2tleQUAAAAFdmFsdWUBAAAACHdyaXRlSW50AAAAAgAAAANrZXkAAAAFdmFsdWUDCQAAZgAAAAIAAAAAAAAAAAAFAAAABXZhbH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VsZi4AAAABaQEAAAAEaW5pdAAAAAEAAAAGY29uZmlnCQAETAAAAAIJAQAAABB3cml0ZUNvbnN0U3RyaW5nAAAAAgUAAAASY29uZmlnQWRkcmVzc1N0b3JlBQAAAAZjb25maWcFAAAAA25pbAAAAABTS3yo", "height": 3310468, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func throwIf (condition,error) = if (condition) | |
5 | + | then throw(error) | |
6 | + | else true | |
7 | + | ||
8 | + | ||
9 | + | func nonEmptyString (s,key) = if ((0 >= size(s))) | |
10 | + | then throw(("empty string: " + key)) | |
11 | + | else true | |
12 | + | ||
13 | + | ||
14 | + | func writeString (key,value) = if ((0 >= size(value))) | |
15 | + | then throw(("empty string: " + key)) | |
16 | + | else StringEntry(key, value) | |
17 | + | ||
18 | + | ||
19 | + | func writeInt (key,value) = if ((0 > value)) | |
20 | + | then throw(((("writing negative value " + toString(value)) + " for key ") + key)) | |
21 | + | else IntegerEntry(key, value) | |
22 | + | ||
23 | + | ||
24 | + | func writeConstString (key,value) = if (if (!(isDefined(getString(this, key)))) | |
25 | + | then nonEmptyString(value, key) | |
26 | + | else false) | |
27 | + | then StringEntry(key, value) | |
28 | + | else throw(("already initialized: " + key)) | |
29 | + | ||
30 | + | ||
31 | + | func writeConstInt (key,value) = if (!(isDefined(getInteger(this, key)))) | |
32 | + | then IntegerEntry(key, value) | |
33 | + | else throw(("already exists: " + key)) | |
34 | + | ||
35 | + | ||
36 | + | func changeBy (key,value) = writeInt(key, (valueOrElse(getInteger(this, key), 0) + value)) | |
37 | + | ||
38 | + | ||
39 | + | func asInt (value) = match value { | |
40 | + | case int: Int => | |
41 | + | int | |
42 | + | case _ => | |
43 | + | throw("wrong type, expected: Int") | |
44 | + | } | |
45 | + | ||
46 | + | ||
47 | + | let configAddressStore = "config" | |
48 | + | ||
49 | + | let configAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, configAddressStore), "no config")), "invalid config address") | |
50 | + | ||
51 | + | let voting = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(configAddress, "contract_voting_result"), "no contract_voting_result")), "invalid contract_voting_result") | |
52 | + | ||
53 | + | let staking = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(configAddress, "contract_staking"), "no contract_staking")), "invalid contract_staking") | |
54 | + | ||
55 | + | let userdata = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(configAddress, "contract_user_data"), "no contract_user_data")), "invalid contract_user_data") | |
56 | + | ||
57 | + | let HEIGHT = height | |
58 | + | ||
59 | + | func advise () = ("height: " + toString(HEIGHT)) | |
60 | + | ||
61 | + | ||
62 | + | let BASE = 1000 | |
63 | + | ||
64 | + | func opAllowed (op) = { | |
65 | + | let s = invoke(configAddress, "opAllowed", [op], nil) | |
66 | + | if ((s == s)) | |
67 | + | then true | |
68 | + | else throw("Strict value is not equal to itself.") | |
69 | + | } | |
70 | + | ||
71 | + | ||
72 | + | func addressStore (id) = ("proposal_address_" + id) | |
73 | + | ||
74 | + | ||
75 | + | func heightStore (id) = ("proposal_height_" + id) | |
76 | + | ||
77 | + | ||
78 | + | func votingStartStore (id) = ("proposal_votingstart_" + id) | |
79 | + | ||
80 | + | ||
81 | + | func votingEndStore (id) = ("proposal_votingend_" + id) | |
82 | + | ||
83 | + | ||
84 | + | func byStore (id) = ("proposal_by_" + id) | |
85 | + | ||
86 | + | ||
87 | + | func descriptionStore (id) = ("proposal_description_" + id) | |
88 | + | ||
89 | + | ||
90 | + | func titleStore (id) = ("proposal_title_" + id) | |
91 | + | ||
92 | + | ||
93 | + | func payloadStore (id) = ("proposal_payload_" + id) | |
94 | + | ||
95 | + | ||
96 | + | func maxSnapStore (id) = ("proposal_max_snap_" + id) | |
97 | + | ||
98 | + | ||
99 | + | func totalYesStore (id) = ("proposal_yes_" + id) | |
100 | + | ||
101 | + | ||
102 | + | func totalNoStore (id) = ("proposal_no_" + id) | |
103 | + | ||
104 | + | ||
105 | + | func userYesStore (user,id) = ((("proposal_yes_user_" + id) + "_") + user) | |
106 | + | ||
107 | + | ||
108 | + | func userNoStore (user,id) = ((("proposal_no_user_" + id) + "_") + user) | |
109 | + | ||
110 | + | ||
111 | + | func userLastProposeHeightStore (user) = ("propose_lastheight_" + user) | |
112 | + | ||
113 | + | ||
114 | + | func userYes (user,id) = valueOrElse(getInteger(userdata, userYesStore(user, id)), 0) | |
115 | + | ||
116 | + | ||
117 | + | func userNo (user,id) = valueOrElse(getInteger(userdata, userNoStore(user, id)), 0) | |
118 | + | ||
119 | + | ||
120 | + | func userLastProposeHeight (user) = valueOrElse(getInteger(userdata, userLastProposeHeightStore(user)), -1) | |
121 | + | ||
122 | + | ||
123 | + | let thisAddress = toString(this) | |
124 | + | ||
125 | + | let userProposeDelay = valueOrErrorMessage(getInteger(configAddress, (thisAddress + "_user_propose_delay")), "_user_propose_delay is not defined") | |
126 | + | ||
127 | + | let quorumRatio = valueOrErrorMessage(getInteger(configAddress, (thisAddress + "_proposal_quorum_ratio")), "_proposal_quorum_ratio is not defined") | |
128 | + | ||
129 | + | let quorumMinUnit = valueOrErrorMessage(getInteger(configAddress, (thisAddress + "_proposal_quorum_min")), "_proposal_quorum_min is not defined") | |
130 | + | ||
131 | + | func proposalQuorumStore (txid) = ("proposal_quorum_ratio_" + txid) | |
132 | + | ||
133 | + | ||
134 | + | func proposalQuorumMinStore (txid) = ("proposal_quorum_min_" + txid) | |
135 | + | ||
136 | + | ||
137 | + | let passedRatio = valueOrErrorMessage(getInteger(configAddress, (thisAddress + "_proposal_passed_ratio")), "_proposal_passed_ratio is not defined") | |
138 | + | ||
139 | + | let proposalMinRequired = valueOrErrorMessage(getInteger(configAddress, (thisAddress + "_proposal_min_required")), "_proposal_min_required is not defined") | |
140 | + | ||
141 | + | let votingStartOffset = valueOrErrorMessage(getInteger(configAddress, (thisAddress + "_proposal_votingstart_offset")), "_proposal_votingstart_offset is not defined") | |
142 | + | ||
143 | + | let votingEndOffset = valueOrErrorMessage(getInteger(configAddress, (thisAddress + "_proposal_votingend_offset")), "_proposal_votingend_offset is not defined") | |
144 | + | ||
145 | + | func userStake (user) = asInt(invoke(staking, "userStake", [user], nil)) | |
146 | + | ||
147 | + | ||
148 | + | func proposalExists (txId) = match getInteger(this, heightStore(txId)) { | |
149 | + | case start: Int => | |
150 | + | true | |
151 | + | case _ => | |
152 | + | false | |
153 | + | } | |
154 | + | ||
155 | + | ||
156 | + | func proposalOnVoting (txId) = { | |
157 | + | let nonExistErr = "proposal doesn't exist" | |
158 | + | if (!(proposalExists(txId))) | |
159 | + | then throw(nonExistErr) | |
160 | + | else { | |
161 | + | let votingStart = valueOrErrorMessage(getInteger(this, votingStartStore(txId)), nonExistErr) | |
162 | + | let votingEnd = valueOrErrorMessage(getInteger(this, votingEndStore(txId)), nonExistErr) | |
163 | + | if ((votingStart > HEIGHT)) | |
164 | + | then throw(((("voting not started yet, discussion is in progress, voting will start at block " + toString(votingStart)) + ", now it's ") + toString(HEIGHT))) | |
165 | + | else if ((HEIGHT > votingEnd)) | |
166 | + | then throw(((("voting ended at block " + toString(votingEnd)) + ", now it's ") + toString(HEIGHT))) | |
167 | + | else true | |
168 | + | } | |
169 | + | } | |
170 | + | ||
171 | + | ||
172 | + | func proposalBeforeVoting (txId) = { | |
173 | + | let nonExistErr = "proposal doesn't exist" | |
174 | + | if (!(proposalExists(txId))) | |
175 | + | then throw(nonExistErr) | |
176 | + | else { | |
177 | + | let votingStart = valueOrErrorMessage(getInteger(this, votingStartStore(txId)), nonExistErr) | |
178 | + | if ((HEIGHT >= votingStart)) | |
179 | + | then throw("voting start is already happened") | |
180 | + | else true | |
181 | + | } | |
182 | + | } | |
183 | + | ||
184 | + | ||
185 | + | func totalStake () = asInt(invoke(staking, "totalStake", nil, nil)) | |
186 | + | ||
187 | + | ||
188 | + | func quorum (txId) = valueOrElse(getInteger(proposalQuorumStore(txId)), quorumRatio) | |
189 | + | ||
190 | + | ||
191 | + | func canBroadcast (id,yesInc,noInc) = { | |
192 | + | let votesYes = (valueOrElse(getInteger(("proposal_yes_" + id)), 0) + yesInc) | |
193 | + | let votesNo = (valueOrElse(getInteger(("proposal_no_" + id)), 0) + noInc) | |
194 | + | let total = totalStake() | |
195 | + | let totalVotes = (votesYes + votesNo) | |
196 | + | let hasQuorum = (((totalVotes * BASE) / total) >= quorum(id)) | |
197 | + | let hasPassed = (((votesYes * BASE) / totalVotes) >= passedRatio) | |
198 | + | let hasQuarumAbs = (totalVotes >= getIntegerValue(proposalQuorumMinStore(id))) | |
199 | + | if (if (hasQuorum) | |
200 | + | then hasPassed | |
201 | + | else false) | |
202 | + | then hasQuarumAbs | |
203 | + | else false | |
204 | + | } | |
205 | + | ||
206 | + | ||
207 | + | func adviseProposalUserVotes (txId,user) = { | |
208 | + | let yes = userYes(user, txId) | |
209 | + | let no = userNo(user, txId) | |
210 | + | let txAddress = valueOrErrorMessage(getString(addressStore(txId)), "proposal address not found") | |
211 | + | ((((("height: " + toString(HEIGHT)) + ", vote_yes: ") + toString(yes)) + ", vote_no: ") + toString(no)) | |
212 | + | } | |
213 | + | ||
214 | + | ||
215 | + | func adviseProposal (txId) = { | |
216 | + | let proposalHeight = valueOrErrorMessage(getInteger(heightStore(txId)), "no proposal") | |
217 | + | let votingStart = valueOrErrorMessage(getInteger(votingStartStore(txId)), "no proposal") | |
218 | + | let votingEnd = valueOrErrorMessage(getInteger(votingEndStore(txId)), "no proposal") | |
219 | + | let votesYes = valueOrElse(getInteger(totalYesStore(txId)), 0) | |
220 | + | let votesNo = valueOrElse(getInteger(totalNoStore(txId)), 0) | |
221 | + | let maxSnap = valueOrElse(getInteger(maxSnapStore(txId)), 0) | |
222 | + | let totalVotes = (votesYes + votesNo) | |
223 | + | let quorumMin = getIntegerValue(proposalQuorumMinStore(txId)) | |
224 | + | let hasQuarumAbs = (totalVotes >= quorumMin) | |
225 | + | let q = quorum(txId) | |
226 | + | let hasQuorum = if ((totalVotes > 0)) | |
227 | + | then if ((((totalVotes * BASE) / maxSnap) >= q)) | |
228 | + | then hasQuarumAbs | |
229 | + | else false | |
230 | + | else false | |
231 | + | let hasPassed = if ((totalVotes > 0)) | |
232 | + | then (((votesYes * BASE) / totalVotes) >= passedRatio) | |
233 | + | else false | |
234 | + | let inBlockchainHeight = valueOrElse(transactionHeightById(fromBase58String(txId)), 0) | |
235 | + | let status = if ((votingStart > HEIGHT)) | |
236 | + | then "discussion" | |
237 | + | else if ((votingEnd >= HEIGHT)) | |
238 | + | then "voting" | |
239 | + | else if (!(hasQuorum)) | |
240 | + | then "noQuorum" | |
241 | + | else if (!(hasPassed)) | |
242 | + | then "votingFailed" | |
243 | + | else if ((inBlockchainHeight > 0)) | |
244 | + | then "inBlockchain" | |
245 | + | else "waitingForTx" | |
246 | + | ((((((((((((((((((((((((((((((((("height: " + toString(HEIGHT)) + ", proposal_id: ") + txId) + ", proposal_title: ") + getStringValue(titleStore(txId))) + ", proposal_address: ") + valueOrErrorMessage(addressStore(txId), "no address")) + ", proposal_status: ") + status) + ", proposal_by: ") + valueOrErrorMessage(getString(this, byStore(txId)), "no proposal")) + ", proposal_height: ") + toString(proposalHeight)) + ", proposal_txheight: ") + toString(inBlockchainHeight)) + ", proposal_votingstart: ") + toString(votingStart)) + ", proposal_votingend: ") + toString(votingEnd)) + ", proposal_max: ") + toString(maxSnap)) + ", vote_yes: ") + toString(votesYes)) + ", vote_no: ") + toString(votesNo)) + ", proposal_quorum: ") + toString(q)) + ", proposal_quorum_min: ") + toString(quorumMin)) + ", proposal_description: ") + getStringValue(descriptionStore(txId))) + ", proposal_payload: ") + getStringValue(payloadStore(txId))) | |
247 | + | } | |
248 | + | ||
249 | + | ||
250 | + | func broadcastHeight (txId) = (getIntegerValue(votingEndStore(txId)) + 1) | |
251 | + | ||
252 | + | ||
253 | + | func setResult (txAddress,txId,result) = invoke(voting, "setResult", [txAddress, txId, result, broadcastHeight(txId)], nil) | |
254 | + | ||
255 | + | ||
256 | + | func setMaxSnap (txId) = IntegerEntry(maxSnapStore(txId), totalStake()) | |
257 | + | ||
258 | + | ||
259 | + | func lock (user,txId) = { | |
260 | + | let votingEnd = getIntegerValue(votingEndStore(txId)) | |
261 | + | let unlock = (votingEnd + 1) | |
262 | + | invoke(staking, "lockFor", [user, unlock], nil) | |
263 | + | } | |
264 | + | ||
265 | + | ||
266 | + | @Callable(i) | |
267 | + | func propose (address,txId,title,description,payload) = { | |
268 | + | let checks = opAllowed("governance_propose_tx") | |
269 | + | if ((checks == checks)) | |
270 | + | then { | |
271 | + | let user = toString(i.caller) | |
272 | + | let gv = userStake(user) | |
273 | + | if ((proposalMinRequired > gv)) | |
274 | + | then throw((((("not enough staked units to make proposal." + " Minimum required = ") + toString(proposalMinRequired)) + ", actual: = ") + toString(gv))) | |
275 | + | else { | |
276 | + | let last = userLastProposeHeight(user) | |
277 | + | if (if ((last > -1)) | |
278 | + | then ((last + userProposeDelay) > HEIGHT) | |
279 | + | else false) | |
280 | + | then throw(((("can't propose too often, last proroposal height: " + toString(last)) + ", blocks to wait: ") + toString(((last + userProposeDelay) - HEIGHT)))) | |
281 | + | else { | |
282 | + | let votingEnds = (HEIGHT + votingEndOffset) | |
283 | + | let l = invoke(userdata, "write", [userLastProposeHeightStore(user), HEIGHT], nil) | |
284 | + | if ((l == l)) | |
285 | + | then [writeConstInt(heightStore(txId), HEIGHT), setMaxSnap(txId), writeConstInt(votingStartStore(txId), (HEIGHT + votingStartOffset)), writeConstInt(votingEndStore(txId), votingEnds), writeConstString(byStore(txId), toString(i.caller)), writeConstString(addressStore(txId), address), IntegerEntry(proposalQuorumStore(txId), quorumRatio), IntegerEntry(proposalQuorumMinStore(txId), quorumMinUnit), writeString(descriptionStore(txId), description), writeString(payloadStore(txId), payload), writeConstString(titleStore(txId), title)] | |
286 | + | else throw("Strict value is not equal to itself.") | |
287 | + | } | |
288 | + | } | |
289 | + | } | |
290 | + | else throw("Strict value is not equal to itself.") | |
291 | + | } | |
292 | + | ||
293 | + | ||
294 | + | ||
295 | + | @Callable(i) | |
296 | + | func edit (txId,title,description) = { | |
297 | + | let checks = if (opAllowed("governance_edit_attachments")) | |
298 | + | then proposalBeforeVoting(txId) | |
299 | + | else false | |
300 | + | if ((checks == checks)) | |
301 | + | then { | |
302 | + | let user = toString(i.caller) | |
303 | + | let by = valueOrErrorMessage(getString(this, byStore(txId)), "proposal doesn't exist") | |
304 | + | if ((by != user)) | |
305 | + | then throw("only owner can edit proposal attachments e.g. title, description") | |
306 | + | else [writeString(titleStore(txId), title), writeString(descriptionStore(txId), description)] | |
307 | + | } | |
308 | + | else throw("Strict value is not equal to itself.") | |
309 | + | } | |
310 | + | ||
311 | + | ||
312 | + | ||
313 | + | @Callable(i) | |
314 | + | func voteYes (txId) = { | |
315 | + | let checks = if (opAllowed("governance_vote_tx")) | |
316 | + | then proposalOnVoting(txId) | |
317 | + | else false | |
318 | + | if ((checks == checks)) | |
319 | + | then { | |
320 | + | let user = toString(i.caller) | |
321 | + | if ((userNo(user, txId) > 0)) | |
322 | + | then throw("already voted against, please retract your vote first") | |
323 | + | else { | |
324 | + | let yesDelta = (userStake(user) - userYes(user, txId)) | |
325 | + | let l = lock(user, txId) | |
326 | + | if ((l == l)) | |
327 | + | then { | |
328 | + | let txAddress = valueOrErrorMessage(getString(addressStore(txId)), "proposal address not found") | |
329 | + | let result = canBroadcast(txId, yesDelta, 0) | |
330 | + | let s = setResult(txAddress, txId, result) | |
331 | + | if ((s == s)) | |
332 | + | then { | |
333 | + | let y = invoke(userdata, "changeBy", [userYesStore(user, txId), yesDelta], nil) | |
334 | + | if ((y == y)) | |
335 | + | then [setMaxSnap(txId), changeBy(totalYesStore(txId), yesDelta)] | |
336 | + | else throw("Strict value is not equal to itself.") | |
337 | + | } | |
338 | + | else throw("Strict value is not equal to itself.") | |
339 | + | } | |
340 | + | else throw("Strict value is not equal to itself.") | |
341 | + | } | |
342 | + | } | |
343 | + | else throw("Strict value is not equal to itself.") | |
344 | + | } | |
345 | + | ||
346 | + | ||
347 | + | ||
348 | + | @Callable(i) | |
349 | + | func voteNo (txId) = { | |
350 | + | let checks = if (opAllowed("governance_vote_tx")) | |
351 | + | then proposalOnVoting(txId) | |
352 | + | else false | |
353 | + | if ((checks == checks)) | |
354 | + | then { | |
355 | + | let user = toString(i.caller) | |
356 | + | if ((userYes(user, txId) > 0)) | |
357 | + | then throw("already voted for, please retract your vote first") | |
358 | + | else { | |
359 | + | let noDelta = (userStake(user) - userNo(user, txId)) | |
360 | + | let l = lock(user, txId) | |
361 | + | if ((l == l)) | |
362 | + | then { | |
363 | + | let txAddress = valueOrErrorMessage(getString(addressStore(txId)), "proposal address not found") | |
364 | + | let result = canBroadcast(txId, 0, noDelta) | |
365 | + | let s = setResult(txAddress, txId, result) | |
366 | + | if ((s == s)) | |
367 | + | then { | |
368 | + | let n = invoke(userdata, "changeBy", [userNoStore(user, txId), noDelta], nil) | |
369 | + | if ((n == n)) | |
370 | + | then [setMaxSnap(txId), changeBy(totalNoStore(txId), noDelta)] | |
371 | + | else throw("Strict value is not equal to itself.") | |
372 | + | } | |
373 | + | else throw("Strict value is not equal to itself.") | |
374 | + | } | |
375 | + | else throw("Strict value is not equal to itself.") | |
376 | + | } | |
377 | + | } | |
378 | + | else throw("Strict value is not equal to itself.") | |
379 | + | } | |
380 | + | ||
381 | + | ||
382 | + | ||
383 | + | @Callable(i) | |
384 | + | func retract (txId) = { | |
385 | + | let checks = if (opAllowed("governance_retract_vote")) | |
386 | + | then proposalOnVoting(txId) | |
387 | + | else false | |
388 | + | if ((checks == checks)) | |
389 | + | then { | |
390 | + | let user = toString(i.caller) | |
391 | + | let yes = userYes(user, txId) | |
392 | + | let no = userNo(user, txId) | |
393 | + | let txAddress = valueOrErrorMessage(getString(addressStore(txId)), "proposal address not found") | |
394 | + | let result = canBroadcast(txId, -(yes), -(no)) | |
395 | + | let s = setResult(txAddress, txId, result) | |
396 | + | if ((s == s)) | |
397 | + | then { | |
398 | + | let y = invoke(userdata, "delete", [userYesStore(user, txId)], nil) | |
399 | + | if ((y == y)) | |
400 | + | then { | |
401 | + | let n = invoke(userdata, "delete", [userNoStore(user, txId)], nil) | |
402 | + | if ((n == n)) | |
403 | + | then [changeBy(totalYesStore(txId), -(yes)), changeBy(totalNoStore(txId), -(no))] | |
404 | + | else throw("Strict value is not equal to itself.") | |
405 | + | } | |
406 | + | else throw("Strict value is not equal to itself.") | |
407 | + | } | |
408 | + | else throw("Strict value is not equal to itself.") | |
409 | + | } | |
410 | + | else throw("Strict value is not equal to itself.") | |
411 | + | } | |
412 | + | ||
413 | + | ||
414 | + | ||
415 | + | @Callable(i) | |
416 | + | func retractProposal (txId) = { | |
417 | + | let checks = if (opAllowed("governance_retract_proposal_tx")) | |
418 | + | then proposalBeforeVoting(txId) | |
419 | + | else false | |
420 | + | if ((checks == checks)) | |
421 | + | then { | |
422 | + | let by = valueOrErrorMessage(getString(this, byStore(txId)), "proposal doesn't exist") | |
423 | + | let user = toString(i.caller) | |
424 | + | if ((by != user)) | |
425 | + | then throw("only owner can retract proposal") | |
426 | + | else { | |
427 | + | let l = invoke(userdata, "delete", [userLastProposeHeightStore(user)], nil) | |
428 | + | if ((l == l)) | |
429 | + | then [DeleteEntry(heightStore(txId)), DeleteEntry(votingStartStore(txId)), DeleteEntry(votingEndStore(txId)), DeleteEntry(byStore(txId)), DeleteEntry(maxSnapStore(txId)), DeleteEntry(totalYesStore(txId)), DeleteEntry(totalNoStore(txId)), DeleteEntry(addressStore(txId)), DeleteEntry(titleStore(txId)), DeleteEntry(payloadStore(txId))] | |
430 | + | else throw("Strict value is not equal to itself.") | |
431 | + | } | |
432 | + | } | |
433 | + | else throw("Strict value is not equal to itself.") | |
434 | + | } | |
435 | + | ||
436 | + | ||
437 | + | ||
438 | + | @Callable(i) | |
439 | + | func init (config) = [writeConstString(configAddressStore, config)] | |
440 | + | ||
441 | + |
github/deemru/w8io/026f985 37.60 ms ◑