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