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