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