tx · 2x1A7Fhbat8D1mqPEkMks2CJitbPc9tTewpwXW2g1hgd

3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc:  -0.02400000 Waves

2023.04.17 12:16 [2538371] smart account 3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc > SELF 0.00000000 Waves

{ "type": 13, "id": "2x1A7Fhbat8D1mqPEkMks2CJitbPc9tTewpwXW2g1hgd", "fee": 2400000, "feeAssetId": null, "timestamp": 1681722999413, "version": 2, "chainId": 84, "sender": "3Mu5kJR7ECoKqV4RjdtjBkeKaQoTgR1WBZc", "senderPublicKey": "242mibE5dTci8wD6vghuCGxjDZdnNJr88H7gcWWehpEX", "proofs": [ "3Noa92i1HgnybGDsZBUG9evk75CL1CxP9LcwvrovVwBCcj6NXkcCD9gJXqToWfrActW3Rvfpd2r7fre2Kw8p62SZ" ], "script": "base64:BgI1CAISBwoFCAEBAQESBAoCAQESBwoFCAgBARgSBwoFCAgBARgSAwoBARIDCgEBEgASBAoCAQhcAAtyZXZpc2lvbk51bQIAAANTRVACAl9fAAdMSVNUU0VQAgE6AA1ERUZBVUxUUVVPUlVNAKDCHgAKVVJMUEFUVEVSTgIaaHR0cHM6Ly9mb3J1bS5uZXV0cmluby5hdC8ACE1BWFRJVExFAPoBAAZNQVhVUkwA+gEADU1BWFZPVElOR1RJTUUAgJDkwAQABU1VTFQ2AMCEPQAOREVGQVVMVFBBWU1FTlQAgJTr3AMAFERFRkFVTFRDUkVBVElPTkdOU0JUAICU69wDAApQQVNUTUFSR0lOAIC6twMADEZVVFVSRU1BUkdJTgDAy8kCABRERUZBVUxURklSU1RQUk9QT1NBTABvABJnb3ZJZHhQcm9wb3NhbFR4SWQAAQAKZ292SWR4VHlwZQACAAxnb3ZJZHhBdXRob3IAAwAJZ292SWR4VXJsAAQAC2dvdklkeFRpdGxlAAUAEmdvdklkeENyZWF0aW9uVGltZQAGAAtnb3ZJZHhTdGFydAAHAAlnb3ZJZHhFbmQACAALZ292S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hCKtceNRnMcWRupXv Diff:
OldNewDifferences
111111 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
112112
113113
114-let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3P5Bfd58PPfNvBM2Hy8QfbcDqMeNtzg7KfP"))
114+let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
115115
116116 let controlCfg = readControlCfgOrFail(controlContract)
117117
120120 let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp)
121121
122122 let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp)
123+
124+func keyLastBase58Proposal () = "%s__lastBase58Proposal"
125+
123126
124127 func keyQuorumRequiredPercent (type) = ("%s%s__quorumRequired__" + type)
125128
307310 then 1
308311 else 0))
309312 let optionsStr = makeString(optionsList, LISTSEP)
310- $Tuple2([IntegerEntry(keyLastProposalId(), proposalId), IntegerEntry(keyProposalIdByTopicId(topicId), proposalId), StringEntry(keyProposalStatusDataById(proposalId), statusData(false, 0, 0, 0, false, votingEndTime, false, "ACTIVE")), 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)
313+ let lastBase58Proposal = getInteger(keyLastBase58Proposal())
314+ let optionallastBase58Proposal = if ((lastBase58Proposal != unit))
315+ then nil
316+ else [IntegerEntry(keyLastBase58Proposal(), (proposalId - 1))]
317+ $Tuple2(([IntegerEntry(keyLastProposalId(), proposalId), IntegerEntry(keyProposalIdByTopicId(topicId), proposalId), StringEntry(keyProposalStatusDataById(proposalId), statusData(false, 0, 0, 0, false, votingEndTime, false, "ACTIVE")), StringEntry(keyProposalDataById(proposalId), proposalData(proposalTxId, type, author, toBase16String(toBytes(forumLink)), toBase16String(toBytes(title)), proposalTime, votingStartTime, votingEndTime, txIds, quorumInGnsbt, optionsStr)), IntegerEntry(keyNumProposalsByAuthor(author), numProposalsByAuthor), IntegerEntry(keyStatsUniqueAuthors(), uniqAuthors)] ++ optionallastBase58Proposal), proposalTxId)
311318 }
312319 else throw("Strict value is not equal to itself.")
313320 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let revisionNum = ""
55
66 let SEP = "__"
77
88 let LISTSEP = ":"
99
1010 let DEFAULTQUORUM = 500000
1111
1212 let URLPATTERN = "https://forum.neutrino.at/"
1313
1414 let MAXTITLE = 250
1515
1616 let MAXURL = 250
1717
1818 let MAXVOTINGTIME = 1209600000
1919
2020 let MULT6 = 1000000
2121
2222 let DEFAULTPAYMENT = 1000000000
2323
2424 let DEFAULTCREATIONGNSBT = 1000000000
2525
2626 let PASTMARGIN = 7200000
2727
2828 let FUTUREMARGIN = 5400000
2929
3030 let DEFAULTFIRSTPROPOSAL = 111
3131
3232 let govIdxProposalTxId = 1
3333
3434 let govIdxType = 2
3535
3636 let govIdxAuthor = 3
3737
3838 let govIdxUrl = 4
3939
4040 let govIdxTitle = 5
4141
4242 let govIdxCreationTime = 6
4343
4444 let govIdxStart = 7
4545
4646 let govIdxEnd = 8
4747
4848 let govIdxTxIds = 9
4949
5050 let govIdxQuorum = 10
5151
5252 let govIdxOptions = 11
5353
5454 let govStatusIdxIsValid = 1
5555
5656 let govStatusIdxWinOpt = 2
5757
5858 let govStatusIdxWinVotes = 3
5959
6060 let govStatusIdxTotalVotes = 4
6161
6262 let govStatusIdxScApplied = 5
6363
6464 let govStatusIdxScTime = 6
6565
6666 let govStatusIdxIsCanceled = 7
6767
6868 let govStatusIdxImplStatus = 8
6969
7070 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
7171
7272
7373 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
7474
7575
7676 let IdxControlCfgNeutrinoDapp = 1
7777
7878 let IdxControlCfgAuctionDapp = 2
7979
8080 let IdxControlCfgRpdDapp = 3
8181
8282 let IdxControlCfgMathDapp = 4
8383
8484 let IdxControlCfgLiquidationDapp = 5
8585
8686 let IdxControlCfgRestDapp = 6
8787
8888 let IdxControlCfgNodeRegistryDapp = 7
8989
9090 let IdxControlCfgNsbtStakingDapp = 8
9191
9292 let IdxControlCfgMediatorDapp = 9
9393
9494 let IdxControlCfgSurfStakingDapp = 10
9595
9696 let IdxControlCfgGnsbtControllerDapp = 11
9797
9898 let IdxControlCfgRestV2Dapp = 12
9999
100100 let IdxControlCfgGovernanceDapp = 13
101101
102102 func keyControlAddress () = "%s%s__config__controlAddress"
103103
104104
105105 func keyControlCfg () = "%s__controlConfig"
106106
107107
108108 func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
109109
110110
111111 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
112112
113113
114-let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3P5Bfd58PPfNvBM2Hy8QfbcDqMeNtzg7KfP"))
114+let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
115115
116116 let controlCfg = readControlCfgOrFail(controlContract)
117117
118118 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
119119
120120 let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp)
121121
122122 let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp)
123+
124+func keyLastBase58Proposal () = "%s__lastBase58Proposal"
125+
123126
124127 func keyQuorumRequiredPercent (type) = ("%s%s__quorumRequired__" + type)
125128
126129
127130 func keyPaymentRequired () = "%s__paymentRequired"
128131
129132
130133 func keyGnsbtRequired () = "%s__gNsbtRequired"
131134
132135
133136 func keyLastProposalId () = "%s__proposalId"
134137
135138
136139 func keyFirstProposalId () = "%s__firstProposalId"
137140
138141
139142 func keyLastUpdateVersion () = "%s__updateVersion"
140143
141144
142145 func keyProposalStatusDataById (proposalId) = ("%s%d__proposalStatusData__" + toString(proposalId))
143146
144147
145148 func keyProposalDataById (proposalId) = ("%s%d__proposalData__" + toString(proposalId))
146149
147150
148151 func keyProposalVotesByIdAndOption (proposalId,opt) = makeString(["%s%d%d", "votesByOpt", toString(proposalId), toString(opt)], SEP)
149152
150153
151154 func keyProposalVotesByIdAndUser (proposalId,userAddr) = makeString(["%s%d%s", "votesByUser", toString(proposalId), userAddr], SEP)
152155
153156
154157 func keyProposalChoiceByIdAndUser (proposalId,userAddr) = makeString(["%s%d%s", "optionByUser", toString(proposalId), userAddr], SEP)
155158
156159
157160 func keyApplyInProgress () = "%s__applyInProgress"
158161
159162
160163 func keyProposalIdByTopicId (topicId) = ("%s%d__proposalIdByTopicId__" + toString(topicId))
161164
162165
163166 func keyUserGnsbtReleaseTime (userAddr) = ("%s%s_userGnsbtReleaseTime__" + userAddr)
164167
165168
166169 func keyNumUniqueVotersByProposalId (proposalId) = ("%s%d__numVoters__" + toString(proposalId))
167170
168171
169172 func keyStatsAverUniqueVoters () = "%s%s%s__stats__avg__uniqueVoters"
170173
171174
172175 func keyStatsAverGnsbtVoted () = "%s%s%s__stats__avg__gnsbtVoted"
173176
174177
175178 func keyStatsUniqueAuthors () = "%s%s__stats__uniqueAuthors"
176179
177180
178181 func keyNumProposalsByAuthor (addressStr) = ("%s%s__numProposalsByAuthor__" + addressStr)
179182
180183
181184 func keyApplyHistory (timestamp) = ("%s%d__applyHistory__" + toString(timestamp))
182185
183186
184187 func asAnyList (v) = match v {
185188 case l: List[Any] =>
186189 l
187190 case _ =>
188191 throw("fail to cast into List[Any]")
189192 }
190193
191194
192195 func asInt (v) = match v {
193196 case i: Int =>
194197 i
195198 case _ =>
196199 throw("fail to cast into Int")
197200 }
198201
199202
200203 func statusData (isVotingValid,winOption,winOptionVotes,totalVotes,areScriptsApplied,scriptsTimestamp,canceledByTeam,implStatus) = makeString(["%b%d%d%d%b%d%b%s", toString(isVotingValid), toString(winOption), toString(winOptionVotes), toString(totalVotes), toString(areScriptsApplied), toString(scriptsTimestamp), toString(canceledByTeam), implStatus], SEP)
201204
202205
203206 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)
204207
205208
206209 func checkTxList (txList) = if ((size(txList) > 20))
207210 then throw(("Too many transactions: " + toString(size(txList))))
208211 else {
209212 func combiner (acc,tx) = if ((size(fromBase58String(tx)) != 32))
210213 then throw(("Wrong txId: " + tx))
211214 else if ((acc == ""))
212215 then tx
213216 else ((acc + LISTSEP) + tx)
214217
215218 let $l = txList
216219 let $s = size($l)
217220 let $acc0 = ""
218221 func $f0_1 ($a,$i) = if (($i >= $s))
219222 then $a
220223 else combiner($a, $l[$i])
221224
222225 func $f0_2 ($a,$i) = if (($i >= $s))
223226 then $a
224227 else throw("List size exceeds 20")
225228
226229 $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)
227230 }
228231
229232
230233 let IdxEffTotal = 0
231234
232235 let IdxEffUser = 1
233236
234237 func getEffectiveGnsbt (userAddrStrOrEmpty) = {
235238 let upd = if (isDefined(addressFromString(userAddrStrOrEmpty)))
236239 then invoke(surfStakingContract, "updateVotingPower", [userAddrStrOrEmpty], nil)
237240 else unit
238241 if ((upd == upd))
239242 then {
240243 let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddrStrOrEmpty, 0, 0], nil))
241244 let nsbtData = asAnyList(gnsbtData[2])
242245 let userFromNsbt = asInt(nsbtData[2])
243246 let totalFromNsbt = asInt(nsbtData[3])
244247 let userMatureFromSurf = asInt(gnsbtData[9])
245248 let totalMatureFromSurf = asInt(gnsbtData[6])
246249 [(totalFromNsbt + totalMatureFromSurf), (userFromNsbt + userMatureFromSurf)]
247250 }
248251 else throw("Strict value is not equal to itself.")
249252 }
250253
251254
252255 func validateLink (url) = if ((value(indexOf(url, URLPATTERN)) != 0))
253256 then throw("Invalid url")
254257 else if ((size(url) > MAXURL))
255258 then throw("Url too long!")
256259 else {
257260 let topicId = valueOrErrorMessage(parseInt(drop(url, (value(lastIndexOf(url, "/")) + 1))), "Wrong topicId")
258261 let registeredId = getInteger(keyProposalIdByTopicId(topicId))
259262 if (isDefined(registeredId))
260263 then throw(("Voting with such forum link is already registered by id=" + toString(value(registeredId))))
261264 else topicId
262265 }
263266
264267
265268 func initiateVoting (payment,proposalTxId,type,author,forumLink,title,votingStartTime,votingEndTime,status,txList,optionsList) = if ((payment.assetId != unit))
266269 then throw("Allowed WAVES payment only!")
267270 else {
268271 let pmtReq = getIntOrElse(keyPaymentRequired(), DEFAULTPAYMENT)
269272 if ((pmtReq > payment.amount))
270273 then throw(("Payment attached should be at least " + toString(pmtReq)))
271274 else {
272275 let topicId = validateLink(forumLink)
273276 if ((title == ""))
274277 then throw("Title is empty")
275278 else if ((size(title) > MAXTITLE))
276279 then throw("Too long title")
277280 else {
278281 let proposalTime = lastBlock.timestamp
279282 if ((proposalTime > votingStartTime))
280283 then throw(((("votingStartTime=" + toString(votingStartTime)) + " < proposalTime=") + toString(proposalTime)))
281284 else if ((votingStartTime > votingEndTime))
282285 then throw(((("votingEndTime=" + toString(votingEndTime)) + " < votingStartTime=") + toString(votingStartTime)))
283286 else if (((votingEndTime - votingStartTime) > MAXVOTINGTIME))
284287 then throw(((("Voting period exceeds max: " + toString((votingEndTime - votingStartTime))) + " > ") + toString(MAXVOTINGTIME)))
285288 else {
286289 let txIds = if ((type == "IDEA"))
287290 then ""
288291 else checkTxList(txList)
289292 if ((1 >= size(optionsList)))
290293 then throw("Too few choices to vote")
291294 else {
292295 let eff = getEffectiveGnsbt(author)
293296 let gnsbtTotal = eff[IdxEffTotal]
294297 let gNsbtUser = eff[IdxEffUser]
295298 let gnsbtReq = getIntOrElse(keyGnsbtRequired(), DEFAULTCREATIONGNSBT)
296299 if ((gnsbtReq > gNsbtUser))
297300 then throw((("You need at least " + toString(gnsbtReq)) + " gNsbt to create voting"))
298301 else {
299302 let amountLeased = invoke(neutrinoContract, "acceptWaves", nil, [payment])
300303 if ((amountLeased == amountLeased))
301304 then {
302305 let quorum = getIntOrElse(keyQuorumRequiredPercent(type), DEFAULTQUORUM)
303306 let quorumInGnsbt = fraction(quorum, gnsbtTotal, MULT6)
304307 let proposalId = (getIntOrElse(keyLastProposalId(), 0) + 1)
305308 let numProposalsByAuthor = (getIntOrElse(keyNumProposalsByAuthor(author), 0) + 1)
306309 let uniqAuthors = (getIntOrElse(keyStatsUniqueAuthors(), 0) + (if ((numProposalsByAuthor == 1))
307310 then 1
308311 else 0))
309312 let optionsStr = makeString(optionsList, LISTSEP)
310- $Tuple2([IntegerEntry(keyLastProposalId(), proposalId), IntegerEntry(keyProposalIdByTopicId(topicId), proposalId), StringEntry(keyProposalStatusDataById(proposalId), statusData(false, 0, 0, 0, false, votingEndTime, false, "ACTIVE")), 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)
313+ let lastBase58Proposal = getInteger(keyLastBase58Proposal())
314+ let optionallastBase58Proposal = if ((lastBase58Proposal != unit))
315+ then nil
316+ else [IntegerEntry(keyLastBase58Proposal(), (proposalId - 1))]
317+ $Tuple2(([IntegerEntry(keyLastProposalId(), proposalId), IntegerEntry(keyProposalIdByTopicId(topicId), proposalId), StringEntry(keyProposalStatusDataById(proposalId), statusData(false, 0, 0, 0, false, votingEndTime, false, "ACTIVE")), StringEntry(keyProposalDataById(proposalId), proposalData(proposalTxId, type, author, toBase16String(toBytes(forumLink)), toBase16String(toBytes(title)), proposalTime, votingStartTime, votingEndTime, txIds, quorumInGnsbt, optionsStr)), IntegerEntry(keyNumProposalsByAuthor(author), numProposalsByAuthor), IntegerEntry(keyStatsUniqueAuthors(), uniqAuthors)] ++ optionallastBase58Proposal), proposalTxId)
311318 }
312319 else throw("Strict value is not equal to itself.")
313320 }
314321 }
315322 }
316323 }
317324 }
318325 }
319326
320327
321328 func calcWinOption (proposalId,optionsList,isPrevOptional,oldChoice,optionalTotalOld,newChoice,newTotalByNewChoice) = {
322329 func findBest (acc,elem) = {
323330 let idx = value(indexOf(optionsList, elem))
324331 let val = if (isPrevOptional)
325332 then if ((idx == newChoice))
326333 then newTotalByNewChoice
327334 else getIntOrElse(keyProposalVotesByIdAndOption(proposalId, idx), 0)
328335 else if ((idx == value(oldChoice)))
329336 then optionalTotalOld
330337 else if ((idx == newChoice))
331338 then newTotalByNewChoice
332339 else getIntOrElse(keyProposalVotesByIdAndOption(proposalId, idx), 0)
333340 if ((acc._2 > val))
334341 then acc
335342 else $Tuple2(idx, val)
336343 }
337344
338345 let $l = optionsList
339346 let $s = size($l)
340347 let $acc0 = $Tuple2(0, 0)
341348 func $f0_1 ($a,$i) = if (($i >= $s))
342349 then $a
343350 else findBest($a, $l[$i])
344351
345352 func $f0_2 ($a,$i) = if (($i >= $s))
346353 then $a
347354 else throw("List size exceeds 10")
348355
349356 $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)
350357 }
351358
352359
353360 func updateStatusData (oldData,isValid,newWinOpt,newTotalVotes) = makeString(["%b%d%d%d%b%d%b%s", toString(isValid), toString(newWinOpt._1), toString(newWinOpt._2), toString(newTotalVotes), oldData[govStatusIdxScApplied], oldData[govStatusIdxScTime], oldData[govStatusIdxIsCanceled], oldData[govStatusIdxImplStatus]], SEP)
354361
355362
356363 func statusApplyScript (oldData) = makeString(["%b%d%d%d%b%d%b%s", oldData[govStatusIdxIsValid], oldData[govStatusIdxWinOpt], oldData[govStatusIdxWinVotes], oldData[govStatusIdxTotalVotes], "true", oldData[govStatusIdxScTime], oldData[govStatusIdxIsCanceled], oldData[govStatusIdxImplStatus]], SEP)
357364
358365
359366 func ExecutionHistory (updateVersion,title,url,proposalId) = {
360367 let gnsbtTotal = getEffectiveGnsbt("")[IdxEffTotal]
361368 let turnout = 500000
362369 StringEntry(keyApplyHistory(lastBlock.timestamp), makeString(["%d%d%d%s%s%d", toString(updateVersion), toString(gnsbtTotal), toString(turnout), title, url, toString(proposalId)], SEP))
363370 }
364371
365372
366373 @Callable(i)
367374 func constructorV1 (controlAddr,gNsbtReqToInit,wavesReqToInit,quorumReqPercIdea,quorumReqPercUpdate) = if ((i.caller != this))
368375 then throw("Permission denied")
369376 else [StringEntry(keyControlAddress(), controlAddr), IntegerEntry(keyGnsbtRequired(), gNsbtReqToInit), IntegerEntry(keyPaymentRequired(), wavesReqToInit), IntegerEntry(keyQuorumRequiredPercent("IDEA"), quorumReqPercIdea), IntegerEntry(keyQuorumRequiredPercent("UPDATE"), quorumReqPercUpdate)]
370377
371378
372379
373380 @Callable(i)
374381 func castVote (proposalId,choice) = {
375382 let userAddressStr = toString(i.caller)
376383 let dynamicData = split(getStringOrFail(this, keyProposalStatusDataById(proposalId)), SEP)
377384 if ((dynamicData[govStatusIdxIsCanceled] == "true"))
378385 then throw("Voting is canceled by team")
379386 else {
380387 let propData = split(getStringOrFail(this, keyProposalDataById(proposalId)), SEP)
381388 let start = parseIntValue(propData[govIdxStart])
382389 let end = parseIntValue(propData[govIdxEnd])
383390 let now = lastBlock.timestamp
384391 if ((start > now))
385392 then throw("Voting not started yet")
386393 else if ((now >= end))
387394 then throw("Voting already finished")
388395 else {
389396 let availableOptions = split(propData[govIdxOptions], LISTSEP)
390397 let numOptions = size(availableOptions)
391398 if ((1 >= numOptions))
392399 then throw("Too few choices to vote")
393400 else if ((choice >= numOptions))
394401 then throw(("Unknown choice! Must be 0.." + toString((numOptions - 1))))
395402 else {
396403 let eff = getEffectiveGnsbt(userAddressStr)
397404 let gnsbtAmt = eff[IdxEffUser]
398405 if ((0 >= gnsbtAmt))
399406 then throw("no gnsbt to vote")
400407 else {
401408 let gnsbtTotal = eff[IdxEffTotal]
402409 let oldChoice = getInteger(keyProposalChoiceByIdAndUser(proposalId, userAddressStr))
403410 let oldUserVotes = if (!(isDefined(oldChoice)))
404411 then 0
405412 else getIntOrElse(keyProposalVotesByIdAndUser(proposalId, userAddressStr), 0)
406413 let oldTotalByOldChoice = if (isDefined(oldChoice))
407414 then getIntOrElse(keyProposalVotesByIdAndOption(proposalId, value(oldChoice)), 0)
408415 else 0
409416 let oldTotalByNewChoice = getIntOrElse(keyProposalVotesByIdAndOption(proposalId, choice), 0)
410417 let oldTotal = parseIntValue(dynamicData[govStatusIdxTotalVotes])
411418 let newTotalByOldChoice = if (!(isDefined(oldChoice)))
412419 then 0
413420 else ((oldTotalByOldChoice - oldUserVotes) + (if ((value(oldChoice) == choice))
414421 then gnsbtAmt
415422 else 0))
416423 let newTotalByNewChoice = if (if (isDefined(oldChoice))
417424 then (value(oldChoice) == choice)
418425 else false)
419426 then newTotalByOldChoice
420427 else (oldTotalByNewChoice + gnsbtAmt)
421428 let newTotal = ((oldTotal - oldUserVotes) + gnsbtAmt)
422429 let isQuorumReached = (newTotal >= parseIntValue(propData[govIdxQuorum]))
423430 let numVotersByProposalId = getIntOrElse(keyNumUniqueVotersByProposalId(proposalId), 0)
424431 let oldAverUniqueVoters6 = getIntOrElse(keyStatsAverUniqueVoters(), 0)
425432 let numProposals = ((getIntegerValue(keyLastProposalId()) - valueOrElse(getInteger(keyFirstProposalId()), DEFAULTFIRSTPROPOSAL)) + 1)
426433 let uniqueDiff = if ((oldUserVotes == 0))
427434 then 1
428435 else 0
429436 let newAverUniqueVoters6 = (oldAverUniqueVoters6 + fraction(uniqueDiff, MULT6, numProposals))
430437 let oldAverGnsbt = getIntOrElse(keyStatsAverGnsbtVoted(), 0)
431438 let newAverGnsbt = (oldAverGnsbt + ((gnsbtAmt - oldUserVotes) / numProposals))
432439 let isPrevOptional = if (!(isDefined(oldChoice)))
433440 then true
434441 else (value(oldChoice) == choice)
435442 let optionalTotalOld = if (isPrevOptional)
436443 then nil
437444 else [IntegerEntry(keyProposalVotesByIdAndOption(proposalId, value(oldChoice)), newTotalByOldChoice)]
438445 let winOpt = calcWinOption(proposalId, availableOptions, isPrevOptional, oldChoice, newTotalByOldChoice, choice, newTotalByNewChoice)
439446 let releaseTime = max([end, getIntOrElse(keyUserGnsbtReleaseTime(userAddressStr), 0)])
440447 $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)
441448 }
442449 }
443450 }
444451 }
445452 }
446453
447454
448455
449456 @Callable(i)
450457 func initiateIdeaVoting (forumLink,title,votingStartTime,votingEndTime,optionsList) = if ((size(i.payments) != 1))
451458 then throw("Exactly one payment required")
452459 else if ((size(optionsList) != 2))
453460 then throw("Exactly 2 option ['NO', 'YES'] are expected")
454461 else if ((optionsList[0] != "NO"))
455462 then throw("Option NO should be the first")
456463 else if ((optionsList[1] != "YES"))
457464 then throw("Option YES should be the second")
458465 else initiateVoting(value(i.payments[0]), toBase58String(i.transactionId), "IDEA", toString(i.caller), forumLink, title, votingStartTime, votingEndTime, "PENDING", nil, optionsList)
459466
460467
461468
462469 @Callable(i)
463470 func initiateUpdateVoting (forumLink,title,votingStartTime,votingEndTime,txList) = if ((size(i.payments) != 1))
464471 then throw("Exactly one payment required")
465472 else if ((1 > size(txList)))
466473 then throw("Transactions list is empty")
467474 else if ((i.caller != this))
468475 then throw("not authorized")
469476 else initiateVoting(value(i.payments[0]), toBase58String(i.transactionId), "UPDATE", toString(i.caller), forumLink, title, votingStartTime, votingEndTime, "PENDING", txList, ["NO", "YES"])
470477
471478
472479
473480 @Callable(i)
474481 func cancelVoting (proposalId) = if ((i.caller != this))
475482 then throw("not authorized")
476483 else {
477484 let currentData = getStringOrFail(this, keyProposalStatusDataById(proposalId))
478485 let updatedData = ((take(currentData, value(lastIndexOf(currentData, SEP))) + SEP) + "true")
479486 $Tuple2([StringEntry(keyProposalStatusDataById(proposalId), updatedData)], unit)
480487 }
481488
482489
483490
484491 @Callable(i)
485492 func applyUpdate (proposalId) = {
486493 let propData = split(getStringOrFail(this, keyProposalDataById(proposalId)), SEP)
487494 let end = parseIntValue(propData[govIdxEnd])
488495 let now = lastBlock.timestamp
489496 if ((end > now))
490497 then throw("Voting is not finished yet")
491498 else if (("UPDATE" != propData[govIdxType]))
492499 then throw("Only UPDATE type can be applied")
493500 else {
494501 let dynamicData = split(getStringOrFail(this, keyProposalStatusDataById(proposalId)), SEP)
495502 if ((dynamicData[govStatusIdxIsCanceled] == "true"))
496503 then throw("Voting is canceled")
497504 else if ((dynamicData[govStatusIdxIsValid] != "true"))
498505 then throw("Voting status invalid")
499506 else if ((dynamicData[govStatusIdxWinOpt] != "1"))
500507 then throw("Winner is 'NO' - nothing to apply")
501508 else if ((dynamicData[govStatusIdxScApplied] == "true"))
502509 then throw("Scripts are already applied")
503510 else {
504511 let scriptTime = parseIntValue(dynamicData[govStatusIdxScTime])
505512 if (((now - PASTMARGIN) > scriptTime))
506513 then throw((("Scripts timestamp=" + toString(scriptTime)) + " is too far in the past, max 2 hrs allowed"))
507514 else if ((scriptTime > (now + FUTUREMARGIN)))
508515 then throw((("Scripts timestamp=" + toString(scriptTime)) + " is too far in the future, max 1.5 hrs allowed"))
509516 else {
510517 let inProgressId = getIntOrElse(keyApplyInProgress(), -1)
511518 if ((inProgressId != -1))
512519 then throw((("proposalId=" + toString(inProgressId)) + " is already being applied. Finish it first!"))
513520 else {
514521 let shutdown = invoke(controlContract, "callEmergencyShutdown", ["Applying Governance UPDATE"], nil)
515522 if ((shutdown == shutdown))
516523 then $Tuple2([IntegerEntry(keyApplyInProgress(), proposalId)], unit)
517524 else throw("Strict value is not equal to itself.")
518525 }
519526 }
520527 }
521528 }
522529 }
523530
524531
525532
526533 @Callable(i)
527534 func finishApply () = {
528535 let proposalId = valueOrErrorMessage(getInteger(keyApplyInProgress()), "No apply in progress, nothing to finish")
529536 let propData = split(getStringOrFail(this, keyProposalDataById(proposalId)), SEP)
530537 let txList = split(propData[govIdxTxIds], LISTSEP)
531538 let dynamicData = split(getStringOrFail(this, keyProposalStatusDataById(proposalId)), SEP)
532539 if ((dynamicData[govStatusIdxScApplied] == "true"))
533540 then throw("Scripts are already applied")
534541 else {
535542 func checker (acc,tx) = if (!(isDefined(transactionHeightById(fromBase58String(tx)))))
536543 then throw(("NOT applied txId: " + tx))
537544 else unit
538545
539546 let ignored = {
540547 let $l = txList
541548 let $s = size($l)
542549 let $acc0 = unit
543550 func $f0_1 ($a,$i) = if (($i >= $s))
544551 then $a
545552 else checker($a, $l[$i])
546553
547554 func $f0_2 ($a,$i) = if (($i >= $s))
548555 then $a
549556 else throw("List size exceeds 20")
550557
551558 $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)
552559 }
553560 let version = (getIntOrElse(keyLastUpdateVersion(), 0) + 1)
554561 $Tuple2([DeleteEntry(keyApplyInProgress()), IntegerEntry(keyLastUpdateVersion(), version), StringEntry(keyProposalStatusDataById(proposalId), statusApplyScript(dynamicData)), ExecutionHistory(version, propData[govIdxTitle], propData[govIdxUrl], proposalId)], ignored)
555562 }
556563 }
557564
558565
559566
560567 @Callable(i)
561568 func changeImplStatus (proposalId,newStatus) = if ((i.caller != this))
562569 then throw("not authorized")
563570 else if (if ((newStatus != "ACTIVE"))
564571 then (newStatus != "OUTDATED")
565572 else false)
566573 then throw("Unknown implementation status")
567574 else {
568575 let dynamicData = split(getStringOrFail(this, keyProposalStatusDataById(proposalId)), SEP)
569576 let updated = makeString(["%b%d%d%d%b%d%b%s", dynamicData[govStatusIdxIsValid], dynamicData[govStatusIdxWinOpt], dynamicData[govStatusIdxWinVotes], dynamicData[govStatusIdxTotalVotes], dynamicData[govStatusIdxScApplied], dynamicData[govStatusIdxScTime], dynamicData[govStatusIdxIsCanceled], newStatus], SEP)
570577 $Tuple2([StringEntry(keyProposalStatusDataById(proposalId), updated)], unit)
571578 }
572579
573580

github/deemru/w8io/026f985 
77.41 ms