tx · Gmz6Hcc8DuVxChMEFf1U5HgHH2sW8TvM7av7rnq8na7j 3NC9dyrMheMhHXcaeCXkuKqaTkLFa5Ahzd2: -0.01000000 Waves 2023.11.08 15:41 [2834391] smart account 3NC9dyrMheMhHXcaeCXkuKqaTkLFa5Ahzd2 > SELF 0.00000000 Waves
{ "type": 13, "id": "Gmz6Hcc8DuVxChMEFf1U5HgHH2sW8TvM7av7rnq8na7j", "fee": 1000000, "feeAssetId": null, "timestamp": 1699447370090, "version": 2, "chainId": 84, "sender": "3NC9dyrMheMhHXcaeCXkuKqaTkLFa5Ahzd2", "senderPublicKey": "8fS13zFL61wF3maPyR7vTayhasoH9StToqd7wGuecHXN", "proofs": [ "2p5Bew5UVcuGytbuxhhXr31o1n3Bt1yMAd38tkFRXMcyRdUgfbouKYF4t3vie1RJieN2C44WPLhPykhMp9wn1SNk" ], "script": "base64:BgJZCAISBAoCCAgSBAoCCAESBAoCCAQSBAoCCAISAwoBCBIDCgEBEgMKAQESBQoDAgECEgUKAwIYGBIECgICARIICgYICAgBAgESBQoDCAgIEgQKAggYEgMKAQgyAAlzZXBhcmF0b3ICAl9fAAdjaGFpbklkCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAhjaGFpbklkVAEBVAAIY2hhaW5JZFcBAVcBC211c3RBZGRyZXNzAgFpB2FkZHJlc3MDCQAAAggFAWkGY2FsbGVyBQdhZGRyZXNzBgkAAgECEXBlcm1pc3Npb24gZGVuaWVkAQhtdXN0VGhpcwEBaQkBC211c3RBZGRyZXNzAgUBaQUEdGhpcwADU0VQAgJfXwAFV0FWRVMCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhJ3eGRhb19mYWN0b3J5LnJpZGUBB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3N0cmluZ1RvQXNzZXRJZAEBcwMJAAACBQFzBQVXQV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HgCaWQHBwQIYnlBZG1pbnMJAAACCAUCdHgCaWQJANkEAQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzCQEOa2V5QWxsb3dlZFR4SWQAAgAEB2J5T3duZXIDCQBnAgkAkAMBCQENZ2V0QWRtaW5zTGlzdAAFBlFVT1JVTQcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkDAwUKYnlQcm9wb3NhbAYFCGJ5QWRtaW5zBgUHYnlPd25lcm9wjrg=", "height": 2834391, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: AJitddCyvvx7w6fnSJrVnNy6sH4Gb78aCAYzGk828oZr Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let separator = "__" | |
5 | + | ||
6 | + | let chainId = take(drop(this.bytes, 1), 1) | |
7 | + | ||
8 | + | let chainIdT = base58'2T' | |
9 | + | ||
10 | + | let chainIdW = base58'2W' | |
11 | + | ||
12 | + | func mustAddress (i,address) = if ((i.caller == address)) | |
13 | + | then true | |
14 | + | else throw("permission denied") | |
15 | + | ||
16 | + | ||
17 | + | func mustThis (i) = mustAddress(i, this) | |
18 | + | ||
19 | + | ||
20 | + | let SEP = "__" | |
21 | + | ||
22 | + | let WAVES = "WAVES" | |
23 | + | ||
24 | + | let contractFilename = "wxdao_factory.ride" | |
25 | + | ||
26 | + | func wrapErr (s) = ((contractFilename + ": ") + s) | |
27 | + | ||
28 | + | ||
29 | + | func throwErr (s) = throw(wrapErr(s)) | |
30 | + | ||
31 | + | ||
32 | + | func stringToAssetId (s) = if ((s == WAVES)) | |
33 | + | then unit | |
34 | + | else fromBase58String(s) | |
35 | + | ||
36 | + | ||
37 | + | let ADMIN_LIST_SIZE = 5 | |
38 | + | ||
39 | + | let QUORUM = 3 | |
40 | + | ||
41 | + | let TXID_BYTES_LENGTH = 32 | |
42 | + | ||
43 | + | func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP) | |
44 | + | ||
45 | + | ||
46 | + | func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP) | |
47 | + | ||
48 | + | ||
49 | + | func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP) | |
50 | + | ||
51 | + | ||
52 | + | func keyAllowedTxId () = makeString(["%s", "txId"], SEP) | |
53 | + | ||
54 | + | ||
55 | + | func getAdminVote (prefix,admin) = { | |
56 | + | let voteKey = keyFullAdminVote(prefix, admin) | |
57 | + | valueOrElse(getInteger(voteKey), 0) | |
58 | + | } | |
59 | + | ||
60 | + | ||
61 | + | func getAdminsList () = match getString(this, keyAdminAddressList()) { | |
62 | + | case s: String => | |
63 | + | split(s, SEP) | |
64 | + | case _ => | |
65 | + | nil | |
66 | + | } | |
67 | + | ||
68 | + | ||
69 | + | func isInAdminList (address) = containsElement(getAdminsList(), address) | |
70 | + | ||
71 | + | ||
72 | + | func genVotesKeysHelper (a,adminAddress) = { | |
73 | + | let $t014801504 = a | |
74 | + | let result = $t014801504._1 | |
75 | + | let prefix = $t014801504._2 | |
76 | + | $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix) | |
77 | + | } | |
78 | + | ||
79 | + | ||
80 | + | func genVotesKeys (keyPrefix) = { | |
81 | + | let adminList = keyAdminAddressList() | |
82 | + | let $t016511735 = { | |
83 | + | let $l = getAdminsList() | |
84 | + | let $s = size($l) | |
85 | + | let $acc0 = $Tuple2(nil, keyPrefix) | |
86 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
87 | + | then $a | |
88 | + | else genVotesKeysHelper($a, $l[$i]) | |
89 | + | ||
90 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
91 | + | then $a | |
92 | + | else throw("List size exceeds 5") | |
93 | + | ||
94 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
95 | + | } | |
96 | + | let result = $t016511735._1 | |
97 | + | let prefix = $t016511735._2 | |
98 | + | result | |
99 | + | } | |
100 | + | ||
101 | + | ||
102 | + | func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0)) | |
103 | + | ||
104 | + | ||
105 | + | func countVotes (prefix) = { | |
106 | + | let votes = genVotesKeys(prefix) | |
107 | + | let $l = votes | |
108 | + | let $s = size($l) | |
109 | + | let $acc0 = 0 | |
110 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
111 | + | then $a | |
112 | + | else countVotesHelper($a, $l[$i]) | |
113 | + | ||
114 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
115 | + | then $a | |
116 | + | else throw("List size exceeds 5") | |
117 | + | ||
118 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
119 | + | } | |
120 | + | ||
121 | + | ||
122 | + | func clearVotesHelper (result,key) = (result :+ DeleteEntry(key)) | |
123 | + | ||
124 | + | ||
125 | + | func getClearVoteEntries (prefix) = { | |
126 | + | let votes = genVotesKeys(prefix) | |
127 | + | let $l = votes | |
128 | + | let $s = size($l) | |
129 | + | let $acc0 = nil | |
130 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
131 | + | then $a | |
132 | + | else clearVotesHelper($a, $l[$i]) | |
133 | + | ||
134 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
135 | + | then $a | |
136 | + | else throw("List size exceeds 5") | |
137 | + | ||
138 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
139 | + | } | |
140 | + | ||
141 | + | ||
142 | + | func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = { | |
143 | + | let voteKey = keyFullAdminVote(keyPrefix, callerAddressString) | |
144 | + | let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString) | |
145 | + | let err = if (!(isInAdminList(callerAddressString))) | |
146 | + | then throwErr((("Address: " + callerAddressString) + " not in Admin list")) | |
147 | + | else if ((adminCurrentVote == 1)) | |
148 | + | then throwErr((voteKey + " you already voted")) | |
149 | + | else unit | |
150 | + | if ((err == err)) | |
151 | + | then { | |
152 | + | let votes = countVotes(keyPrefix) | |
153 | + | if (((votes + 1) >= minVotes)) | |
154 | + | then { | |
155 | + | let clearVoteEntries = getClearVoteEntries(keyPrefix) | |
156 | + | (clearVoteEntries ++ voteResult) | |
157 | + | } | |
158 | + | else [IntegerEntry(voteKey, 1)] | |
159 | + | } | |
160 | + | else throw("Strict value is not equal to itself.") | |
161 | + | } | |
162 | + | ||
163 | + | ||
164 | + | func keyCalculatorAddress () = "%s__calculator" | |
165 | + | ||
166 | + | ||
167 | + | func keyLpAssetId () = "%s__lpAssetId" | |
168 | + | ||
169 | + | ||
170 | + | func currentPeriod () = makeString(["%s", "currentPeriod"], SEP) | |
171 | + | ||
172 | + | ||
173 | + | func startHeightByPeriod (period) = makeString(["%s%d", "startHeight", toString(period)], SEP) | |
174 | + | ||
175 | + | ||
176 | + | func periodLength () = makeString(["%s", "periodLength"], SEP) | |
177 | + | ||
178 | + | ||
179 | + | func treasuryValueByPeriod (period) = makeString(["%s%d", "treasuryValue", toString(period)], SEP) | |
180 | + | ||
181 | + | ||
182 | + | func treasuryValue () = makeString(["%s", "treasuryValue"], SEP) | |
183 | + | ||
184 | + | ||
185 | + | let calculatorAddressOption = match getString(this, keyCalculatorAddress()) { | |
186 | + | case s: String => | |
187 | + | addressFromString(s) | |
188 | + | case _: Unit => | |
189 | + | unit | |
190 | + | case _ => | |
191 | + | throw("Match error") | |
192 | + | } | |
193 | + | ||
194 | + | let calculatorAddressOrFail = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address")) | |
195 | + | ||
196 | + | func keyConfigAddress () = "%s__config" | |
197 | + | ||
198 | + | ||
199 | + | func keyPowerContractAddress () = "%s__powerContract" | |
200 | + | ||
201 | + | ||
202 | + | func keyVotingResultAddress () = "contract_voting_result" | |
203 | + | ||
204 | + | ||
205 | + | func keyProposalAllowBroadcast (address,txId) = ((("proposal_allow_broadcast_" + toString(address)) + "_") + toBase58String(txId)) | |
206 | + | ||
207 | + | ||
208 | + | let configAddressOption = match getString(this, keyConfigAddress()) { | |
209 | + | case s: String => | |
210 | + | addressFromString(s) | |
211 | + | case _: Unit => | |
212 | + | unit | |
213 | + | case _ => | |
214 | + | throw("Match error") | |
215 | + | } | |
216 | + | ||
217 | + | let votingResultAddressOption = match configAddressOption { | |
218 | + | case a: Address => | |
219 | + | match getString(a, keyVotingResultAddress()) { | |
220 | + | case s: String => | |
221 | + | addressFromString(s) | |
222 | + | case _: Unit => | |
223 | + | unit | |
224 | + | case _ => | |
225 | + | throw("Match error") | |
226 | + | } | |
227 | + | case _: Unit => | |
228 | + | unit | |
229 | + | case _ => | |
230 | + | throw("Match error") | |
231 | + | } | |
232 | + | ||
233 | + | let votingResultAddressOrFail = valueOrErrorMessage(votingResultAddressOption, wrapErr("invalid voting result address")) | |
234 | + | ||
235 | + | let lpAssetIdOption = match getString(this, keyLpAssetId()) { | |
236 | + | case s: String => | |
237 | + | fromBase58String(s) | |
238 | + | case _: Unit => | |
239 | + | unit | |
240 | + | case _ => | |
241 | + | throw("Match error") | |
242 | + | } | |
243 | + | ||
244 | + | let lpAssetIdOrFail = valueOrErrorMessage(lpAssetIdOption, wrapErr("invalid lpAssetId")) | |
245 | + | ||
246 | + | func onlyAddress (i,address) = if ((i.caller == address)) | |
247 | + | then true | |
248 | + | else throwErr("permission denied") | |
249 | + | ||
250 | + | ||
251 | + | func onlyThis (i) = onlyAddress(i, this) | |
252 | + | ||
253 | + | ||
254 | + | func onlyCalculator (i) = onlyAddress(i, calculatorAddressOrFail) | |
255 | + | ||
256 | + | ||
257 | + | @Callable(i) | |
258 | + | func stringEntry (key,val) = if (onlyCalculator(i)) | |
259 | + | then $Tuple2([StringEntry(key, val)], key) | |
260 | + | else $Tuple2(nil, unit) | |
261 | + | ||
262 | + | ||
263 | + | ||
264 | + | @Callable(i) | |
265 | + | func integerEntry (key,val) = if (onlyCalculator(i)) | |
266 | + | then $Tuple2([IntegerEntry(key, val)], key) | |
267 | + | else $Tuple2(nil, unit) | |
268 | + | ||
269 | + | ||
270 | + | ||
271 | + | @Callable(i) | |
272 | + | func booleanEntry (key,val) = if (onlyCalculator(i)) | |
273 | + | then $Tuple2([BooleanEntry(key, val)], key) | |
274 | + | else $Tuple2(nil, unit) | |
275 | + | ||
276 | + | ||
277 | + | ||
278 | + | @Callable(i) | |
279 | + | func binaryEntry (key,val) = if (onlyCalculator(i)) | |
280 | + | then $Tuple2([BinaryEntry(key, val)], key) | |
281 | + | else $Tuple2(nil, unit) | |
282 | + | ||
283 | + | ||
284 | + | ||
285 | + | @Callable(i) | |
286 | + | func deleteEntry (key) = if (onlyCalculator(i)) | |
287 | + | then $Tuple2([DeleteEntry(key)], key) | |
288 | + | else $Tuple2(nil, unit) | |
289 | + | ||
290 | + | ||
291 | + | ||
292 | + | @Callable(i) | |
293 | + | func reissue (amount) = if (onlyCalculator(i)) | |
294 | + | then $Tuple2([Reissue(lpAssetIdOrFail, amount, true)], amount) | |
295 | + | else $Tuple2(nil, unit) | |
296 | + | ||
297 | + | ||
298 | + | ||
299 | + | @Callable(i) | |
300 | + | func burn (amount) = if (onlyCalculator(i)) | |
301 | + | then $Tuple2([Burn(lpAssetIdOrFail, amount)], amount) | |
302 | + | else $Tuple2(nil, unit) | |
303 | + | ||
304 | + | ||
305 | + | ||
306 | + | @Callable(i) | |
307 | + | func transferAsset (recipientBytes,amount,assetId) = if (onlyCalculator(i)) | |
308 | + | then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount) | |
309 | + | else $Tuple2(nil, unit) | |
310 | + | ||
311 | + | ||
312 | + | ||
313 | + | @Callable(i) | |
314 | + | func transferAssets (recipientBytes,assetsList,amountsList) = if (onlyCalculator(i)) | |
315 | + | then { | |
316 | + | func addNewTransfer (acc,nextAssetId) = { | |
317 | + | let $t063586382 = acc | |
318 | + | let transfers = $t063586382._1 | |
319 | + | let j = $t063586382._2 | |
320 | + | let newTransfer = ScriptTransfer(Address(recipientBytes), parseIntValue(amountsList[j]), stringToAssetId(assetsList[j])) | |
321 | + | let updatedTransfers = (transfers :+ newTransfer) | |
322 | + | $Tuple2(updatedTransfers, (j + 1)) | |
323 | + | } | |
324 | + | ||
325 | + | let $t066426723 = { | |
326 | + | let $l = assetsList | |
327 | + | let $s = size($l) | |
328 | + | let $acc0 = $Tuple2(nil, 0) | |
329 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
330 | + | then $a | |
331 | + | else addNewTransfer($a, $l[$i]) | |
332 | + | ||
333 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
334 | + | then $a | |
335 | + | else throw("List size exceeds 10") | |
336 | + | ||
337 | + | $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) | |
338 | + | } | |
339 | + | let assetsTransfers = $t066426723._1 | |
340 | + | let _lastIndex = $t066426723._2 | |
341 | + | $Tuple2(assetsTransfers, unit) | |
342 | + | } | |
343 | + | else $Tuple2(nil, unit) | |
344 | + | ||
345 | + | ||
346 | + | ||
347 | + | @Callable(i) | |
348 | + | func transferWaves (recipientBytes,amount) = if (onlyCalculator(i)) | |
349 | + | then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount) | |
350 | + | else $Tuple2(nil, unit) | |
351 | + | ||
352 | + | ||
353 | + | ||
354 | + | @Callable(i) | |
355 | + | func commitAfterStartWithLockRoundFor (contract,child,address,additionalLockRounds,paymentAssetId,paymentAmount) = $Tuple2(nil, invoke(addressFromStringValue(contract), "commitAfterStartWithLockRoundFor", [child, address, additionalLockRounds], [AttachedPayment(paymentAssetId, paymentAmount)])) | |
356 | + | ||
357 | + | ||
358 | + | ||
359 | + | @Callable(i) | |
360 | + | func init (calculatorAddressStr,powerConfigAddressStr,powerContractAddressStr) = { | |
361 | + | let checkCaller = mustThis(i) | |
362 | + | if ((checkCaller == checkCaller)) | |
363 | + | then $Tuple2([StringEntry(keyCalculatorAddress(), calculatorAddressStr), StringEntry(keyConfigAddress(), powerConfigAddressStr), StringEntry(keyPowerContractAddress(), powerContractAddressStr)], unit) | |
364 | + | else throw("Strict value is not equal to itself.") | |
365 | + | } | |
366 | + | ||
367 | + | ||
368 | + | ||
369 | + | @Callable(i) | |
370 | + | func call (function,args) = { | |
371 | + | let result = reentrantInvoke(calculatorAddressOrFail, function, [i.callerPublicKey, args], i.payments) | |
372 | + | $Tuple2(nil, result) | |
373 | + | } | |
374 | + | ||
375 | + | ||
376 | + | ||
377 | + | @Callable(i) | |
378 | + | func voteForTxId (txId) = { | |
379 | + | let callerAddressString = toBase58String(i.caller.bytes) | |
380 | + | let keyPrefix = keyAllowedTxIdVotePrefix(txId) | |
381 | + | let result = [StringEntry(keyAllowedTxId(), txId)] | |
382 | + | let allowedTxIdOption = getString(this, keyAllowedTxId()) | |
383 | + | let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH)) | |
384 | + | then true | |
385 | + | else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit)) | |
386 | + | then true | |
387 | + | else (value(allowedTxIdOption) != txId)) | |
388 | + | then true | |
389 | + | else throwErr((txId + " is already allowed"))] | |
390 | + | if ((err == err)) | |
391 | + | then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result) | |
392 | + | else throw("Strict value is not equal to itself.") | |
393 | + | } | |
394 | + | ||
395 | + | ||
396 | + | @Verifier(tx) | |
397 | + | func verify () = { | |
398 | + | let byProposal = match votingResultAddressOption { | |
399 | + | case proposalAddress: Address => | |
400 | + | valueOrElse(getBoolean(proposalAddress, keyProposalAllowBroadcast(this, tx.id)), false) | |
401 | + | case _ => | |
402 | + | false | |
403 | + | } | |
404 | + | let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), ""))) | |
405 | + | let byOwner = if ((size(getAdminsList()) >= QUORUM)) | |
406 | + | then false | |
407 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
408 | + | if (if (byProposal) | |
409 | + | then true | |
410 | + | else byAdmins) | |
411 | + | then true | |
412 | + | else byOwner | |
413 | + | } | |
414 | + |
github/deemru/w8io/026f985 20.95 ms ◑