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