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