tx · GxL9CvM9LxmCNdf1RrDZFwMfLEhe8SWsSvSPpLvvbZ78 3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc: -0.01800000 Waves 2023.01.12 15:19 [2401728] smart account 3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc > SELF 0.00000000 Waves
{ "type": 13, "id": "GxL9CvM9LxmCNdf1RrDZFwMfLEhe8SWsSvSPpLvvbZ78", "fee": 1800000, "feeAssetId": null, "timestamp": 1673525914752, "version": 2, "chainId": 84, "sender": "3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc", "senderPublicKey": "242mibE5dTci8wD6vghuCGxjDZdnNJr88H7gcWWehpEX", "proofs": [ "5g5n6eGLGdCgAssXTnr1ESRUG6dLL7GxiUBHdZK97yFsn6YPnMVHzGQpfw3M9qmUZFjuiSKaz5jPpJqgsrbkMUie" ], "script": "base64:BgIvCAISBwoFCAEBAQESBAoCAQESBwoFCAgBARgSBwoFCAgBARgSAwoBARIDCgEBEgBZAAtyZXZpc2lvbk51bQIAAANTRVACAl9fAAdMSVNUU0VQAgE6AA1ERUZBVUxUUVVPUlVNAKDCHgAKVVJMUEFUVEVSTgIaaHR0cHM6Ly9mb3J1bS5uZXV0cmluby5hdC8ACE1BWFRJVExFAPoBAAZNQVhVUkwA+gEADU1BWFZPVElOR1RJTUUAgJDkwAQABU1VTFQ2AMCEPQAOREVGQVVMVFBBWU1FTlQAgJTr3AMAFERFRkFVTFRDUkVBVElPTkdOU0JUAICU69wDAApQQVNUTUFSR0lOAIC6twMADEZVVFVSRU1BUkdJTgDAy8kCABRERUZBVUxURklSU1RQUk9QT1NBTABvABJnb3ZJZHhQcm9wb3NhbFR4SWQAAQAKZ292SWR4VHlwZQACAAxnb3ZJZHhBdXRob3IAAwAJZ292SWR4VXJsAAQAC2dvdklkeFRpdGxlAAUAEmdvdklkeENyZWF0aW9uVGltZQAGAAtnb3ZJZHhTdGFydAAHAAlnb3ZJZHhFbmQACAALZ292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HCX", "height": 2401728, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 32rWApqw4nfbKJoFxdMFrUFXtGB8yYeLgj8qWy66mrff Next: DW9RSgESNKPWvggQuVyw7ci1bA8vVh28CPrmWgQyt6wL Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | ||
12 | 12 | let URLPATTERN = "https://forum.neutrino.at/" | |
13 | 13 | ||
14 | - | let MAXTITLE = | |
14 | + | let MAXTITLE = 250 | |
15 | 15 | ||
16 | 16 | let MAXURL = 250 | |
17 | 17 | ||
26 | 26 | let PASTMARGIN = 7200000 | |
27 | 27 | ||
28 | 28 | let FUTUREMARGIN = 5400000 | |
29 | + | ||
30 | + | let DEFAULTFIRSTPROPOSAL = 111 | |
29 | 31 | ||
30 | 32 | let govIdxProposalTxId = 1 | |
31 | 33 | ||
125 | 127 | ||
126 | 128 | ||
127 | 129 | func keyLastProposalId () = "%s__proposalId" | |
130 | + | ||
131 | + | ||
132 | + | func keyFirstProposalId () = "%s__firstProposalId" | |
128 | 133 | ||
129 | 134 | ||
130 | 135 | func keyLastUpdateVersion () = "%s__updateVersion" | |
348 | 353 | ||
349 | 354 | ||
350 | 355 | @Callable(i) | |
351 | - | func | |
356 | + | func constructorV1 (controlAddr,gNsbtReqToInit,wavesReqToInit,quorumReqPercIdea,quorumReqPercUpdate) = if ((i.caller != this)) | |
352 | 357 | then throw("Permission denied") | |
353 | 358 | else [StringEntry(keyControlAddress(), controlAddr), IntegerEntry(keyGnsbtRequired(), gNsbtReqToInit), IntegerEntry(keyPaymentRequired(), wavesReqToInit), IntegerEntry(keyQuorumRequiredPercent("IDEA"), quorumReqPercIdea), IntegerEntry(keyQuorumRequiredPercent("UPDATE"), quorumReqPercUpdate)] | |
354 | 359 | ||
406 | 411 | let isQuorumReached = (newTotal >= parseIntValue(propData[govIdxQuorum])) | |
407 | 412 | let numVotersByProposalId = getIntOrElse(keyNumUniqueVotersByProposalId(proposalId), 0) | |
408 | 413 | let oldAverUniqueVoters6 = getIntOrElse(keyStatsAverUniqueVoters(), 0) | |
409 | - | let numProposals = getIntegerValue(keyLastProposalId()) | |
414 | + | let numProposals = ((getIntegerValue(keyLastProposalId()) - valueOrElse(getInteger(keyFirstProposalId()), DEFAULTFIRSTPROPOSAL)) + 1) | |
410 | 415 | let uniqueDiff = if ((oldUserVotes == 0)) | |
411 | 416 | then 1 | |
412 | 417 | else 0 | |
448 | 453 | then throw("Exactly one payment required") | |
449 | 454 | else if ((1 > size(txList))) | |
450 | 455 | then throw("Transactions list is empty") | |
451 | - | else if ((i.caller != this)) | |
452 | - | then throw("not authorized") | |
453 | - | else initiateVoting(value(i.payments[0]), toBase58String(i.transactionId), "UPDATE", toString(i.caller), forumLink, title, votingStartTime, votingEndTime, "PENDING", txList, ["NO", "YES"]) | |
456 | + | else initiateVoting(value(i.payments[0]), toBase58String(i.transactionId), "UPDATE", toString(i.caller), forumLink, title, votingStartTime, votingEndTime, "PENDING", txList, ["NO", "YES"]) | |
454 | 457 | ||
455 | 458 | ||
456 | 459 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let revisionNum = "" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let LISTSEP = ":" | |
9 | 9 | ||
10 | 10 | let DEFAULTQUORUM = 500000 | |
11 | 11 | ||
12 | 12 | let URLPATTERN = "https://forum.neutrino.at/" | |
13 | 13 | ||
14 | - | let MAXTITLE = | |
14 | + | let MAXTITLE = 250 | |
15 | 15 | ||
16 | 16 | let MAXURL = 250 | |
17 | 17 | ||
18 | 18 | let MAXVOTINGTIME = 1209600000 | |
19 | 19 | ||
20 | 20 | let MULT6 = 1000000 | |
21 | 21 | ||
22 | 22 | let DEFAULTPAYMENT = 1000000000 | |
23 | 23 | ||
24 | 24 | let DEFAULTCREATIONGNSBT = 1000000000 | |
25 | 25 | ||
26 | 26 | let PASTMARGIN = 7200000 | |
27 | 27 | ||
28 | 28 | let FUTUREMARGIN = 5400000 | |
29 | + | ||
30 | + | let DEFAULTFIRSTPROPOSAL = 111 | |
29 | 31 | ||
30 | 32 | let govIdxProposalTxId = 1 | |
31 | 33 | ||
32 | 34 | let govIdxType = 2 | |
33 | 35 | ||
34 | 36 | let govIdxAuthor = 3 | |
35 | 37 | ||
36 | 38 | let govIdxUrl = 4 | |
37 | 39 | ||
38 | 40 | let govIdxTitle = 5 | |
39 | 41 | ||
40 | 42 | let govIdxCreationTime = 6 | |
41 | 43 | ||
42 | 44 | let govIdxStart = 7 | |
43 | 45 | ||
44 | 46 | let govIdxEnd = 8 | |
45 | 47 | ||
46 | 48 | let govIdxTxIds = 9 | |
47 | 49 | ||
48 | 50 | let govIdxQuorum = 10 | |
49 | 51 | ||
50 | 52 | let govIdxOptions = 11 | |
51 | 53 | ||
52 | 54 | let govStatusIdxIsValid = 1 | |
53 | 55 | ||
54 | 56 | let govStatusIdxWinOpt = 2 | |
55 | 57 | ||
56 | 58 | let govStatusIdxWinVotes = 3 | |
57 | 59 | ||
58 | 60 | let govStatusIdxTotalVotes = 4 | |
59 | 61 | ||
60 | 62 | let govStatusIdxScApplied = 5 | |
61 | 63 | ||
62 | 64 | let govStatusIdxScTime = 6 | |
63 | 65 | ||
64 | 66 | let govStatusIdxIsCanceled = 7 | |
65 | 67 | ||
66 | 68 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
70 | 72 | ||
71 | 73 | ||
72 | 74 | let IdxControlCfgNeutrinoDapp = 1 | |
73 | 75 | ||
74 | 76 | let IdxControlCfgAuctionDapp = 2 | |
75 | 77 | ||
76 | 78 | let IdxControlCfgRpdDapp = 3 | |
77 | 79 | ||
78 | 80 | let IdxControlCfgMathDapp = 4 | |
79 | 81 | ||
80 | 82 | let IdxControlCfgLiquidationDapp = 5 | |
81 | 83 | ||
82 | 84 | let IdxControlCfgRestDapp = 6 | |
83 | 85 | ||
84 | 86 | let IdxControlCfgNodeRegistryDapp = 7 | |
85 | 87 | ||
86 | 88 | let IdxControlCfgNsbtStakingDapp = 8 | |
87 | 89 | ||
88 | 90 | let IdxControlCfgMediatorDapp = 9 | |
89 | 91 | ||
90 | 92 | let IdxControlCfgSurfStakingDapp = 10 | |
91 | 93 | ||
92 | 94 | let IdxControlCfgGnsbtControllerDapp = 11 | |
93 | 95 | ||
94 | 96 | let IdxControlCfgRestV2Dapp = 12 | |
95 | 97 | ||
96 | 98 | let IdxControlCfgGovernanceDapp = 13 | |
97 | 99 | ||
98 | 100 | func keyControlAddress () = "%s%s__config__controlAddress" | |
99 | 101 | ||
100 | 102 | ||
101 | 103 | func keyControlCfg () = "%s__controlConfig" | |
102 | 104 | ||
103 | 105 | ||
104 | 106 | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
105 | 107 | ||
106 | 108 | ||
107 | 109 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
108 | 110 | ||
109 | 111 | ||
110 | 112 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3P5Bfd58PPfNvBM2Hy8QfbcDqMeNtzg7KfP")) | |
111 | 113 | ||
112 | 114 | let controlCfg = readControlCfgOrFail(controlContract) | |
113 | 115 | ||
114 | 116 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
115 | 117 | ||
116 | 118 | let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp) | |
117 | 119 | ||
118 | 120 | func keyQuorumRequiredPercent (type) = ("%s%s__quorumRequired__" + type) | |
119 | 121 | ||
120 | 122 | ||
121 | 123 | func keyPaymentRequired () = "%s__paymentRequired" | |
122 | 124 | ||
123 | 125 | ||
124 | 126 | func keyGnsbtRequired () = "%s__gNsbtRequired" | |
125 | 127 | ||
126 | 128 | ||
127 | 129 | func keyLastProposalId () = "%s__proposalId" | |
130 | + | ||
131 | + | ||
132 | + | func keyFirstProposalId () = "%s__firstProposalId" | |
128 | 133 | ||
129 | 134 | ||
130 | 135 | func keyLastUpdateVersion () = "%s__updateVersion" | |
131 | 136 | ||
132 | 137 | ||
133 | 138 | func keyProposalStatusDataById (proposalId) = ("%s%d__proposalStatusData__" + toString(proposalId)) | |
134 | 139 | ||
135 | 140 | ||
136 | 141 | func keyProposalDataById (proposalId) = ("%s%d__proposalData__" + toString(proposalId)) | |
137 | 142 | ||
138 | 143 | ||
139 | 144 | func keyProposalVotesByIdAndOption (proposalId,opt) = makeString(["%s%d%d", "votesByOpt", toString(proposalId), toString(opt)], SEP) | |
140 | 145 | ||
141 | 146 | ||
142 | 147 | func keyProposalVotesByIdAndUser (proposalId,userAddr) = makeString(["%s%d%s", "votesByUser", toString(proposalId), userAddr], SEP) | |
143 | 148 | ||
144 | 149 | ||
145 | 150 | func keyProposalChoiceByIdAndUser (proposalId,userAddr) = makeString(["%s%d%s", "optionByUser", toString(proposalId), userAddr], SEP) | |
146 | 151 | ||
147 | 152 | ||
148 | 153 | func keyApplyInProgress () = "%s__applyInProgress" | |
149 | 154 | ||
150 | 155 | ||
151 | 156 | func keyProposalIdByTopicId (topicId) = ("%s%d__proposalIdByTopicId__" + toString(topicId)) | |
152 | 157 | ||
153 | 158 | ||
154 | 159 | func keyUserGnsbtReleaseTime (userAddr) = ("%s%s_userGnsbtReleaseTime__" + userAddr) | |
155 | 160 | ||
156 | 161 | ||
157 | 162 | func keyNumUniqueVotersByProposalId (proposalId) = ("%s%d__numVoters__" + toString(proposalId)) | |
158 | 163 | ||
159 | 164 | ||
160 | 165 | func keyStatsAverUniqueVoters () = "%s%s%s__stats__avg__uniqueVoters" | |
161 | 166 | ||
162 | 167 | ||
163 | 168 | func keyStatsAverGnsbtVoted () = "%s%s%s__stats__avg__gnsbtVoted" | |
164 | 169 | ||
165 | 170 | ||
166 | 171 | func keyStatsUniqueAuthors () = "%s%s__stats__uniqueAuthors" | |
167 | 172 | ||
168 | 173 | ||
169 | 174 | func keyNumProposalsByAuthor (addressStr) = ("%s%s__numProposalsByAuthor__" + addressStr) | |
170 | 175 | ||
171 | 176 | ||
172 | 177 | func keyApplyHistory (timestamp) = ("%s%d__applyHistory__" + toString(timestamp)) | |
173 | 178 | ||
174 | 179 | ||
175 | 180 | func asAnyList (v) = match v { | |
176 | 181 | case l: List[Any] => | |
177 | 182 | l | |
178 | 183 | case _ => | |
179 | 184 | throw("fail to cast into List[Any]") | |
180 | 185 | } | |
181 | 186 | ||
182 | 187 | ||
183 | 188 | func asInt (v) = match v { | |
184 | 189 | case i: Int => | |
185 | 190 | i | |
186 | 191 | case _ => | |
187 | 192 | throw("fail to cast into Int") | |
188 | 193 | } | |
189 | 194 | ||
190 | 195 | ||
191 | 196 | func statusData (isVotingValid,winOption,winOptionVotes,totalVotes,areScriptsApplied,scriptsTimestamp,canceledByTeam) = makeString(["%b%d%d%d%b%d%b", toString(isVotingValid), toString(winOption), toString(winOptionVotes), toString(totalVotes), toString(areScriptsApplied), toString(scriptsTimestamp), toString(canceledByTeam)], SEP) | |
192 | 197 | ||
193 | 198 | ||
194 | 199 | func proposalData (proposalTxId,type,author,forumLink,title,proposalTime,votingStartTime,votingEndTime,txIds,quorumInGnsbt,options) = makeString(["%s%s%s%s%s%d%d%d%s%d%s", proposalTxId, type, author, forumLink, title, toString(proposalTime), toString(votingStartTime), toString(votingEndTime), txIds, toString(quorumInGnsbt), options], SEP) | |
195 | 200 | ||
196 | 201 | ||
197 | 202 | func checkTxList (txList) = if ((size(txList) > 20)) | |
198 | 203 | then throw(("Too many transactions: " + toString(size(txList)))) | |
199 | 204 | else { | |
200 | 205 | func combiner (acc,tx) = if ((size(fromBase58String(tx)) != 32)) | |
201 | 206 | then throw(("Wrong txId: " + tx)) | |
202 | 207 | else if ((acc == "")) | |
203 | 208 | then tx | |
204 | 209 | else ((acc + LISTSEP) + tx) | |
205 | 210 | ||
206 | 211 | let $l = txList | |
207 | 212 | let $s = size($l) | |
208 | 213 | let $acc0 = "" | |
209 | 214 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
210 | 215 | then $a | |
211 | 216 | else combiner($a, $l[$i]) | |
212 | 217 | ||
213 | 218 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
214 | 219 | then $a | |
215 | 220 | else throw("List size exceeds 20") | |
216 | 221 | ||
217 | 222 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
218 | 223 | } | |
219 | 224 | ||
220 | 225 | ||
221 | 226 | let IdxEffTotal = 0 | |
222 | 227 | ||
223 | 228 | let IdxEffUser = 1 | |
224 | 229 | ||
225 | 230 | func getEffectiveGnsbt (userAddrStrOrEmpty) = { | |
226 | 231 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddrStrOrEmpty, 0, 0], nil)) | |
227 | 232 | let nsbtData = asAnyList(gnsbtData[2]) | |
228 | 233 | let userFromNsbt = asInt(nsbtData[2]) | |
229 | 234 | let totalFromNsbt = asInt(nsbtData[3]) | |
230 | 235 | let userMatureFromSurf = asInt(gnsbtData[9]) | |
231 | 236 | let totalMatureFromSurf = asInt(gnsbtData[6]) | |
232 | 237 | [(totalFromNsbt + totalMatureFromSurf), (userFromNsbt + userMatureFromSurf)] | |
233 | 238 | } | |
234 | 239 | ||
235 | 240 | ||
236 | 241 | func validateLink (url) = if ((value(indexOf(url, URLPATTERN)) != 0)) | |
237 | 242 | then throw("Invalid url") | |
238 | 243 | else if ((size(url) > MAXURL)) | |
239 | 244 | then throw("Url too long!") | |
240 | 245 | else { | |
241 | 246 | let topicId = valueOrErrorMessage(parseInt(drop(url, (value(lastIndexOf(url, "/")) + 1))), "Wrong topicId") | |
242 | 247 | let registeredId = getInteger(keyProposalIdByTopicId(topicId)) | |
243 | 248 | if (isDefined(registeredId)) | |
244 | 249 | then throw(("Voting with such forum link is already registered by id=" + toString(value(registeredId)))) | |
245 | 250 | else topicId | |
246 | 251 | } | |
247 | 252 | ||
248 | 253 | ||
249 | 254 | func initiateVoting (payment,proposalTxId,type,author,forumLink,title,votingStartTime,votingEndTime,status,txList,optionsList) = if ((payment.assetId != unit)) | |
250 | 255 | then throw("Allowed WAVES payment only!") | |
251 | 256 | else { | |
252 | 257 | let pmtReq = getIntOrElse(keyPaymentRequired(), DEFAULTPAYMENT) | |
253 | 258 | if ((pmtReq > payment.amount)) | |
254 | 259 | then throw(("Payment attached should be at least " + toString(pmtReq))) | |
255 | 260 | else { | |
256 | 261 | let topicId = validateLink(forumLink) | |
257 | 262 | if ((title == "")) | |
258 | 263 | then throw("Title is empty") | |
259 | 264 | else if ((size(title) > MAXTITLE)) | |
260 | 265 | then throw("Too long title") | |
261 | 266 | else { | |
262 | 267 | let proposalTime = lastBlock.timestamp | |
263 | 268 | if ((proposalTime > votingStartTime)) | |
264 | 269 | then throw(((("votingStartTime=" + toString(votingStartTime)) + " < proposalTime=") + toString(proposalTime))) | |
265 | 270 | else if ((votingStartTime > votingEndTime)) | |
266 | 271 | then throw(((("votingEndTime=" + toString(votingEndTime)) + " < votingStartTime=") + toString(votingStartTime))) | |
267 | 272 | else if (((votingEndTime - votingStartTime) > MAXVOTINGTIME)) | |
268 | 273 | then throw(((("Voting period exceeds max: " + toString((votingEndTime - votingStartTime))) + " > ") + toString(MAXVOTINGTIME))) | |
269 | 274 | else { | |
270 | 275 | let txIds = if ((type == "IDEA")) | |
271 | 276 | then "" | |
272 | 277 | else checkTxList(txList) | |
273 | 278 | if ((1 >= size(optionsList))) | |
274 | 279 | then throw("Too few choices to vote") | |
275 | 280 | else { | |
276 | 281 | let eff = getEffectiveGnsbt(author) | |
277 | 282 | let gnsbtTotal = eff[IdxEffTotal] | |
278 | 283 | let gNsbtUser = eff[IdxEffUser] | |
279 | 284 | let gnsbtReq = getIntOrElse(keyGnsbtRequired(), DEFAULTCREATIONGNSBT) | |
280 | 285 | if ((gnsbtReq > gNsbtUser)) | |
281 | 286 | then throw((("You need at least " + toString(gnsbtReq)) + " gNsbt to create voting")) | |
282 | 287 | else { | |
283 | 288 | let amountLeased = invoke(neutrinoContract, "acceptWaves", nil, [payment]) | |
284 | 289 | if ((amountLeased == amountLeased)) | |
285 | 290 | then { | |
286 | 291 | let quorum = getIntOrElse(keyQuorumRequiredPercent(type), DEFAULTQUORUM) | |
287 | 292 | let quorumInGnsbt = fraction(quorum, gnsbtTotal, MULT6) | |
288 | 293 | let proposalId = (getIntOrElse(keyLastProposalId(), 0) + 1) | |
289 | 294 | let numProposalsByAuthor = (getIntOrElse(keyNumProposalsByAuthor(author), 0) + 1) | |
290 | 295 | let uniqAuthors = (getIntOrElse(keyStatsUniqueAuthors(), 0) + (if ((numProposalsByAuthor == 1)) | |
291 | 296 | then 1 | |
292 | 297 | else 0)) | |
293 | 298 | let optionsStr = makeString(optionsList, LISTSEP) | |
294 | 299 | $Tuple2([IntegerEntry(keyLastProposalId(), proposalId), IntegerEntry(keyProposalIdByTopicId(topicId), proposalId), StringEntry(keyProposalStatusDataById(proposalId), statusData(false, 0, 0, 0, false, 0, false)), StringEntry(keyProposalDataById(proposalId), proposalData(proposalTxId, type, author, toBase58String(toBytes(forumLink)), toBase58String(toBytes(title)), proposalTime, votingStartTime, votingEndTime, txIds, quorumInGnsbt, optionsStr)), IntegerEntry(keyNumProposalsByAuthor(author), numProposalsByAuthor), IntegerEntry(keyStatsUniqueAuthors(), uniqAuthors)], proposalTxId) | |
295 | 300 | } | |
296 | 301 | else throw("Strict value is not equal to itself.") | |
297 | 302 | } | |
298 | 303 | } | |
299 | 304 | } | |
300 | 305 | } | |
301 | 306 | } | |
302 | 307 | } | |
303 | 308 | ||
304 | 309 | ||
305 | 310 | func calcWinOption (proposalId,optionsList,isPrevOptional,oldChoice,optionalTotalOld,newChoice,newTotalByNewChoice) = { | |
306 | 311 | func findBest (acc,elem) = { | |
307 | 312 | let idx = value(indexOf(optionsList, elem)) | |
308 | 313 | let val = if (isPrevOptional) | |
309 | 314 | then if ((idx == newChoice)) | |
310 | 315 | then newTotalByNewChoice | |
311 | 316 | else getIntOrElse(keyProposalVotesByIdAndOption(proposalId, idx), 0) | |
312 | 317 | else if ((idx == value(oldChoice))) | |
313 | 318 | then optionalTotalOld | |
314 | 319 | else if ((idx == newChoice)) | |
315 | 320 | then newTotalByNewChoice | |
316 | 321 | else getIntOrElse(keyProposalVotesByIdAndOption(proposalId, idx), 0) | |
317 | 322 | if ((acc._2 > val)) | |
318 | 323 | then acc | |
319 | 324 | else $Tuple2(idx, val) | |
320 | 325 | } | |
321 | 326 | ||
322 | 327 | let $l = optionsList | |
323 | 328 | let $s = size($l) | |
324 | 329 | let $acc0 = $Tuple2(0, 0) | |
325 | 330 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
326 | 331 | then $a | |
327 | 332 | else findBest($a, $l[$i]) | |
328 | 333 | ||
329 | 334 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
330 | 335 | then $a | |
331 | 336 | else throw("List size exceeds 10") | |
332 | 337 | ||
333 | 338 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
334 | 339 | } | |
335 | 340 | ||
336 | 341 | ||
337 | 342 | func updateStatusData (oldData,isValid,newWinOpt,newTotalVotes) = makeString(["%b%d%d%d%b%d%b", toString(isValid), toString(newWinOpt._1), toString(newWinOpt._2), toString(newTotalVotes), oldData[govStatusIdxScApplied], oldData[govStatusIdxScTime], oldData[govStatusIdxIsCanceled]], SEP) | |
338 | 343 | ||
339 | 344 | ||
340 | 345 | func statusApplyScript (oldData) = makeString(["%b%d%d%d%b%d%b", oldData[govStatusIdxIsValid], oldData[govStatusIdxWinOpt], oldData[govStatusIdxWinVotes], oldData[govStatusIdxTotalVotes], "true", oldData[govStatusIdxScTime], oldData[govStatusIdxIsCanceled]], SEP) | |
341 | 346 | ||
342 | 347 | ||
343 | 348 | func ExecutionHistory (updateVersion,title,url,proposalId) = { | |
344 | 349 | let gnsbtTotal = getEffectiveGnsbt("")[IdxEffTotal] | |
345 | 350 | let turnout = 500000 | |
346 | 351 | StringEntry(keyApplyHistory(lastBlock.timestamp), makeString(["%d%d%d%s%s%d", toString(updateVersion), toString(gnsbtTotal), toString(turnout), title, url, toString(proposalId)], SEP)) | |
347 | 352 | } | |
348 | 353 | ||
349 | 354 | ||
350 | 355 | @Callable(i) | |
351 | - | func | |
356 | + | func constructorV1 (controlAddr,gNsbtReqToInit,wavesReqToInit,quorumReqPercIdea,quorumReqPercUpdate) = if ((i.caller != this)) | |
352 | 357 | then throw("Permission denied") | |
353 | 358 | else [StringEntry(keyControlAddress(), controlAddr), IntegerEntry(keyGnsbtRequired(), gNsbtReqToInit), IntegerEntry(keyPaymentRequired(), wavesReqToInit), IntegerEntry(keyQuorumRequiredPercent("IDEA"), quorumReqPercIdea), IntegerEntry(keyQuorumRequiredPercent("UPDATE"), quorumReqPercUpdate)] | |
354 | 359 | ||
355 | 360 | ||
356 | 361 | ||
357 | 362 | @Callable(i) | |
358 | 363 | func castVote (proposalId,choice) = { | |
359 | 364 | let userAddressStr = toString(i.caller) | |
360 | 365 | let dynamicData = split(getStringOrFail(this, keyProposalStatusDataById(proposalId)), SEP) | |
361 | 366 | if ((dynamicData[govStatusIdxIsCanceled] == "true")) | |
362 | 367 | then throw("Voting is canceled by team") | |
363 | 368 | else { | |
364 | 369 | let propData = split(getStringOrFail(this, keyProposalDataById(proposalId)), SEP) | |
365 | 370 | let start = parseIntValue(propData[govIdxStart]) | |
366 | 371 | let end = parseIntValue(propData[govIdxEnd]) | |
367 | 372 | let now = lastBlock.timestamp | |
368 | 373 | if ((start > now)) | |
369 | 374 | then throw("Voting not started yet") | |
370 | 375 | else if ((now >= end)) | |
371 | 376 | then throw("Voting already finished") | |
372 | 377 | else { | |
373 | 378 | let availableOptions = split(propData[govIdxOptions], LISTSEP) | |
374 | 379 | let numOptions = size(availableOptions) | |
375 | 380 | if ((1 >= numOptions)) | |
376 | 381 | then throw("Too few choices to vote") | |
377 | 382 | else if ((choice >= numOptions)) | |
378 | 383 | then throw(("Unknown choice! Must be 0.." + toString((numOptions - 1)))) | |
379 | 384 | else { | |
380 | 385 | let eff = getEffectiveGnsbt(userAddressStr) | |
381 | 386 | let gnsbtAmt = eff[IdxEffUser] | |
382 | 387 | if ((0 >= gnsbtAmt)) | |
383 | 388 | then throw("no gnsbt to vote") | |
384 | 389 | else { | |
385 | 390 | let gnsbtTotal = eff[IdxEffTotal] | |
386 | 391 | let oldChoice = getInteger(keyProposalChoiceByIdAndUser(proposalId, userAddressStr)) | |
387 | 392 | let oldUserVotes = if (!(isDefined(oldChoice))) | |
388 | 393 | then 0 | |
389 | 394 | else getIntOrElse(keyProposalVotesByIdAndUser(proposalId, userAddressStr), 0) | |
390 | 395 | let oldTotalByOldChoice = if (isDefined(oldChoice)) | |
391 | 396 | then getIntOrElse(keyProposalVotesByIdAndOption(proposalId, value(oldChoice)), 0) | |
392 | 397 | else 0 | |
393 | 398 | let oldTotalByNewChoice = getIntOrElse(keyProposalVotesByIdAndOption(proposalId, choice), 0) | |
394 | 399 | let oldTotal = parseIntValue(dynamicData[govStatusIdxTotalVotes]) | |
395 | 400 | let newTotalByOldChoice = if (!(isDefined(oldChoice))) | |
396 | 401 | then 0 | |
397 | 402 | else ((oldTotalByOldChoice - oldUserVotes) + (if ((value(oldChoice) == choice)) | |
398 | 403 | then gnsbtAmt | |
399 | 404 | else 0)) | |
400 | 405 | let newTotalByNewChoice = if (if (isDefined(oldChoice)) | |
401 | 406 | then (value(oldChoice) == choice) | |
402 | 407 | else false) | |
403 | 408 | then newTotalByOldChoice | |
404 | 409 | else (oldTotalByNewChoice + gnsbtAmt) | |
405 | 410 | let newTotal = ((oldTotal - oldUserVotes) + gnsbtAmt) | |
406 | 411 | let isQuorumReached = (newTotal >= parseIntValue(propData[govIdxQuorum])) | |
407 | 412 | let numVotersByProposalId = getIntOrElse(keyNumUniqueVotersByProposalId(proposalId), 0) | |
408 | 413 | let oldAverUniqueVoters6 = getIntOrElse(keyStatsAverUniqueVoters(), 0) | |
409 | - | let numProposals = getIntegerValue(keyLastProposalId()) | |
414 | + | let numProposals = ((getIntegerValue(keyLastProposalId()) - valueOrElse(getInteger(keyFirstProposalId()), DEFAULTFIRSTPROPOSAL)) + 1) | |
410 | 415 | let uniqueDiff = if ((oldUserVotes == 0)) | |
411 | 416 | then 1 | |
412 | 417 | else 0 | |
413 | 418 | let newAverUniqueVoters6 = (oldAverUniqueVoters6 + fraction(uniqueDiff, MULT6, numProposals)) | |
414 | 419 | let oldAverGnsbt = getIntOrElse(keyStatsAverGnsbtVoted(), 0) | |
415 | 420 | let newAverGnsbt = (oldAverGnsbt + ((gnsbtAmt - oldUserVotes) / numProposals)) | |
416 | 421 | let isPrevOptional = if (!(isDefined(oldChoice))) | |
417 | 422 | then true | |
418 | 423 | else (value(oldChoice) == choice) | |
419 | 424 | let optionalTotalOld = if (isPrevOptional) | |
420 | 425 | then nil | |
421 | 426 | else [IntegerEntry(keyProposalVotesByIdAndOption(proposalId, value(oldChoice)), newTotalByOldChoice)] | |
422 | 427 | let winOpt = calcWinOption(proposalId, availableOptions, isPrevOptional, oldChoice, newTotalByOldChoice, choice, newTotalByNewChoice) | |
423 | 428 | let releaseTime = max([end, getIntOrElse(keyUserGnsbtReleaseTime(userAddressStr), 0)]) | |
424 | 429 | $Tuple2(([IntegerEntry(keyProposalChoiceByIdAndUser(proposalId, userAddressStr), choice), IntegerEntry(keyProposalVotesByIdAndUser(proposalId, userAddressStr), gnsbtAmt), IntegerEntry(keyProposalVotesByIdAndOption(proposalId, choice), newTotalByNewChoice), IntegerEntry(keyNumUniqueVotersByProposalId(proposalId), (numVotersByProposalId + uniqueDiff)), IntegerEntry(keyUserGnsbtReleaseTime(userAddressStr), releaseTime), IntegerEntry(keyStatsAverUniqueVoters(), newAverUniqueVoters6), IntegerEntry(keyStatsAverGnsbtVoted(), newAverGnsbt), StringEntry(keyProposalStatusDataById(proposalId), updateStatusData(dynamicData, isQuorumReached, winOpt, newTotal))] ++ optionalTotalOld), unit) | |
425 | 430 | } | |
426 | 431 | } | |
427 | 432 | } | |
428 | 433 | } | |
429 | 434 | } | |
430 | 435 | ||
431 | 436 | ||
432 | 437 | ||
433 | 438 | @Callable(i) | |
434 | 439 | func initiateIdeaVoting (forumLink,title,votingStartTime,votingEndTime,optionsList) = if ((size(i.payments) != 1)) | |
435 | 440 | then throw("Exactly one payment required") | |
436 | 441 | else if ((size(optionsList) != 2)) | |
437 | 442 | then throw("Exactly 2 option ['NO', 'YES'] are expected") | |
438 | 443 | else if ((optionsList[0] != "NO")) | |
439 | 444 | then throw("Option NO should be the first") | |
440 | 445 | else if ((optionsList[1] != "YES")) | |
441 | 446 | then throw("Option YES should be the second") | |
442 | 447 | else initiateVoting(value(i.payments[0]), toBase58String(i.transactionId), "IDEA", toString(i.caller), forumLink, title, votingStartTime, votingEndTime, "PENDING", nil, optionsList) | |
443 | 448 | ||
444 | 449 | ||
445 | 450 | ||
446 | 451 | @Callable(i) | |
447 | 452 | func initiateUpdateVoting (forumLink,title,votingStartTime,votingEndTime,txList) = if ((size(i.payments) != 1)) | |
448 | 453 | then throw("Exactly one payment required") | |
449 | 454 | else if ((1 > size(txList))) | |
450 | 455 | then throw("Transactions list is empty") | |
451 | - | else if ((i.caller != this)) | |
452 | - | then throw("not authorized") | |
453 | - | else initiateVoting(value(i.payments[0]), toBase58String(i.transactionId), "UPDATE", toString(i.caller), forumLink, title, votingStartTime, votingEndTime, "PENDING", txList, ["NO", "YES"]) | |
456 | + | else initiateVoting(value(i.payments[0]), toBase58String(i.transactionId), "UPDATE", toString(i.caller), forumLink, title, votingStartTime, votingEndTime, "PENDING", txList, ["NO", "YES"]) | |
454 | 457 | ||
455 | 458 | ||
456 | 459 | ||
457 | 460 | @Callable(i) | |
458 | 461 | func cancelVoting (proposalId) = if ((i.caller != this)) | |
459 | 462 | then throw("not authorized") | |
460 | 463 | else { | |
461 | 464 | let currentData = getStringOrFail(this, keyProposalStatusDataById(proposalId)) | |
462 | 465 | let updatedData = ((take(currentData, value(lastIndexOf(currentData, SEP))) + SEP) + "true") | |
463 | 466 | $Tuple2([StringEntry(keyProposalStatusDataById(proposalId), updatedData)], unit) | |
464 | 467 | } | |
465 | 468 | ||
466 | 469 | ||
467 | 470 | ||
468 | 471 | @Callable(i) | |
469 | 472 | func applyUpdate (proposalId) = { | |
470 | 473 | let propData = split(getStringOrFail(this, keyProposalDataById(proposalId)), SEP) | |
471 | 474 | let end = parseIntValue(propData[govIdxEnd]) | |
472 | 475 | let now = lastBlock.timestamp | |
473 | 476 | if ((end > now)) | |
474 | 477 | then throw("Voting is not finished yet") | |
475 | 478 | else if (("UPDATE" != propData[govIdxType])) | |
476 | 479 | then throw("Only UPDATE type can be applied") | |
477 | 480 | else { | |
478 | 481 | let dynamicData = split(getStringOrFail(this, keyProposalStatusDataById(proposalId)), SEP) | |
479 | 482 | if ((dynamicData[govStatusIdxIsCanceled] == "true")) | |
480 | 483 | then throw("Voting is canceled") | |
481 | 484 | else if ((dynamicData[govStatusIdxIsValid] != "true")) | |
482 | 485 | then throw("Voting status invalid") | |
483 | 486 | else if ((dynamicData[govStatusIdxWinOpt] != "1")) | |
484 | 487 | then throw("Winner is 'NO' - nothing to apply") | |
485 | 488 | else if ((dynamicData[govStatusIdxScApplied] == "true")) | |
486 | 489 | then throw("Scripts are already applied") | |
487 | 490 | else { | |
488 | 491 | let scriptTime = parseIntValue(dynamicData[govStatusIdxScTime]) | |
489 | 492 | if (((now - PASTMARGIN) > scriptTime)) | |
490 | 493 | then throw((("Scripts timestamp=" + toString(scriptTime)) + " is too far in the past, max 2 hrs allowed")) | |
491 | 494 | else if ((scriptTime > (now + FUTUREMARGIN))) | |
492 | 495 | then throw((("Scripts timestamp=" + toString(scriptTime)) + " is too far in the future, max 1.5 hrs allowed")) | |
493 | 496 | else { | |
494 | 497 | let inProgressId = getIntOrElse(keyApplyInProgress(), -1) | |
495 | 498 | if ((inProgressId != -1)) | |
496 | 499 | then throw((("proposalId=" + toString(inProgressId)) + " is already being applied. Finish it first!")) | |
497 | 500 | else { | |
498 | 501 | let shutdown = invoke(controlContract, "callEmergencyShutdown", ["Applying Governance UPDATE"], nil) | |
499 | 502 | if ((shutdown == shutdown)) | |
500 | 503 | then $Tuple2([IntegerEntry(keyApplyInProgress(), proposalId)], unit) | |
501 | 504 | else throw("Strict value is not equal to itself.") | |
502 | 505 | } | |
503 | 506 | } | |
504 | 507 | } | |
505 | 508 | } | |
506 | 509 | } | |
507 | 510 | ||
508 | 511 | ||
509 | 512 | ||
510 | 513 | @Callable(i) | |
511 | 514 | func finishApply () = { | |
512 | 515 | let proposalId = valueOrErrorMessage(getInteger(keyApplyInProgress()), "No apply in progress, nothing to finish") | |
513 | 516 | let propData = split(getStringOrFail(this, keyProposalDataById(proposalId)), SEP) | |
514 | 517 | let txList = split(propData[govIdxTxIds], LISTSEP) | |
515 | 518 | let dynamicData = split(getStringOrFail(this, keyProposalStatusDataById(proposalId)), SEP) | |
516 | 519 | if ((dynamicData[govStatusIdxScApplied] == "true")) | |
517 | 520 | then throw("Scripts are already applied") | |
518 | 521 | else { | |
519 | 522 | func checker (acc,tx) = if (!(isDefined(transactionHeightById(fromBase58String(tx))))) | |
520 | 523 | then throw(("NOT applied txId: " + tx)) | |
521 | 524 | else unit | |
522 | 525 | ||
523 | 526 | let ignored = { | |
524 | 527 | let $l = txList | |
525 | 528 | let $s = size($l) | |
526 | 529 | let $acc0 = unit | |
527 | 530 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
528 | 531 | then $a | |
529 | 532 | else checker($a, $l[$i]) | |
530 | 533 | ||
531 | 534 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
532 | 535 | then $a | |
533 | 536 | else throw("List size exceeds 20") | |
534 | 537 | ||
535 | 538 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
536 | 539 | } | |
537 | 540 | let version = (getIntOrElse(keyLastUpdateVersion(), 0) + 1) | |
538 | 541 | $Tuple2([DeleteEntry(keyApplyInProgress()), IntegerEntry(keyLastUpdateVersion(), version), StringEntry(keyProposalStatusDataById(proposalId), statusApplyScript(dynamicData)), ExecutionHistory(version, propData[govIdxTitle], propData[govIdxUrl], proposalId)], ignored) | |
539 | 542 | } | |
540 | 543 | } | |
541 | 544 | ||
542 | 545 |
github/deemru/w8io/026f985 67.95 ms ◑