tx · JxrJFsdokvQ6B4uC5FwJmiAxNEWG6BqRoUZTr4Tmvbh 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T: -0.01200000 Waves 2024.12.19 10:45 [3421136] smart account 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T > SELF 0.00000000 Waves
{ "type": 13, "id": "JxrJFsdokvQ6B4uC5FwJmiAxNEWG6BqRoUZTr4Tmvbh", "fee": 1200000, "feeAssetId": null, "timestamp": 1734594349757, "version": 2, "chainId": 84, "sender": "3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T", "senderPublicKey": "iTiQR3Kvxn7i8PFgEbZn36n5iFLxFwkTA6M3wi846Vx", "proofs": [ "2TcrC4ESU3Ar7cyQZcrTQhk69h5Xd38eRM5QMn5JMy2CXqihLLh3kuigjTW5xvgcUp3Yjgvhd6sJgReYk8XUoFF3" ], "script": "base64:BwJpCAISAwoBCBIECgIICBIECgIIARIECgIIBBIECgIIAhIDCgEIEgUKAwIBBBIECgICARIFCgMCAQISBQoDAhIREgQKAgIBEgQKAggYEgQKAggYEgMKAQgSAwoBARIHCgUCCAEIARIDCgEIIwADU0VQAgJfXwALd2F2ZXNTdHJpbmcCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhRtZW1lX2ltX2ZhY3RvcnkucmlkZQALa1ByaWNlQXNzZXQCDHByaWNlX19hc3NldAAJa1NodXRkb3duAg5zaHV0ZG93bl9fZmxhZwAIc2h1dGRvd24JAQt2YWx1ZU9yRWxzZQIJAKAIAQUJa1NodXRkb3duBwEHd3JhcEVycgEBcwkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwAPQURNSU5fTElTVF9TSVpFAAoABlFVT1JVTQADABFUWElEX0JZVEVTX0xFTkdUSAAgARhrZXlBbGxvd2VkVHhJZFZvdGVQcmVmaXgBBHR4SWQJALkJAgkAzAgCAgYlcyVzJX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gkAyAEBCQDZBAEFBHR4SWQFEVRYSURfQllURVNfTEVOR1RIBgkBCHRocm93RXJyAQkArAICBQR0eElkAhIgaXMgbm90IHZhbGlkIHR4SWQJAMwIAgMDCQAAAgURYWxsb3dlZFR4SWRPcHRpb24FBHVuaXQGCQECIT0CCQEFdmFsdWUBBRFhbGxvd2VkVHhJZE9wdGlvbgUEdHhJZAYJAQh0aHJvd0VycgEJAKwCAgUEdHhJZAITIGlzIGFscmVhZHkgYWxsb3dlZAUDbmlsAwkAAAIFA2VycgUDZXJyCQEMdm90ZUlOVEVSTkFMBAUTY2FsbGVyQWRkcmVzc1N0cmluZwUJa2V5UHJlZml4BQZRVU9SVU0FBnJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAECGJ5QWRtaW5zCQAAAgkA2AQBCAUCdHgCaWQJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBDmtleUFsbG93ZWRUeElkAAIABAdieU93bmVyAwkAZwIJAJADAQUJYWRtaW5MaXN0BQZRVU9SVU0HCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5AwUIYnlBZG1pbnMGBQdieU93bmVyi+ABFw==", "height": 3421136, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4QTuVspwQvaP834z8rbWSSMf1pkmhnzSauW6EFpiJKW2 Next: HdbWfYRACnws6zHAHTP4S273dhjHbZpALSXqVzPxZr49 Diff:
Old | New | Differences | |
---|---|---|---|
335 | 335 | ||
336 | 336 | ||
337 | 337 | @Callable(i) | |
338 | + | func withdrawLiquidityFromPool (poolAddressString) = if (if (!(shutdown)) | |
339 | + | then mustCalculator(i) | |
340 | + | else false) | |
341 | + | then $Tuple2(nil, invoke(addressFromStringValue(poolAddressString), "withdrawLiquidityAtTarget", nil, nil)) | |
342 | + | else throwErr("not allowed") | |
343 | + | ||
344 | + | ||
345 | + | ||
346 | + | @Callable(i) | |
338 | 347 | func notifyStatusUpdate (status) = { | |
339 | 348 | let result = reentrantInvoke(calculatorAddress, "notifyStatusUpdate", [i.callerPublicKey, [toString(status)]], nil) | |
340 | 349 | $Tuple2(nil, result) | |
341 | 350 | } | |
351 | + | ||
352 | + | ||
353 | + | ||
354 | + | @Callable(i) | |
355 | + | func createWxPool (userPools,asset1Id,asset1Amount,asset2Id,asset2Amount) = if (if (!(shutdown)) | |
356 | + | then mustCalculator(i) | |
357 | + | else false) | |
358 | + | then $Tuple2(nil, invoke(Address(userPools), "create", nil, [AttachedPayment(parseAssetId(asset1Id), asset1Amount), AttachedPayment(parseAssetId(asset2Id), asset2Amount)])) | |
359 | + | else throwErr("not allowed") | |
342 | 360 | ||
343 | 361 | ||
344 | 362 |
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 wavesString = "WAVES" | |
7 | 7 | ||
8 | 8 | let contractFilename = "meme_im_factory.ride" | |
9 | 9 | ||
10 | 10 | let kPriceAsset = "price__asset" | |
11 | 11 | ||
12 | 12 | let kShutdown = "shutdown__flag" | |
13 | 13 | ||
14 | 14 | let shutdown = valueOrElse(getBoolean(kShutdown), false) | |
15 | 15 | ||
16 | 16 | func wrapErr (s) = ((contractFilename + ": ") + s) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func throwErr (s) = throw(wrapErr(s)) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | let ADMIN_LIST_SIZE = 10 | |
23 | 23 | ||
24 | 24 | let QUORUM = 3 | |
25 | 25 | ||
26 | 26 | let TXID_BYTES_LENGTH = 32 | |
27 | 27 | ||
28 | 28 | func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func keyAllowedTxId () = makeString(["%s", "txId"], SEP) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func getAdminVote (prefix,admin) = { | |
41 | 41 | let voteKey = keyFullAdminVote(prefix, admin) | |
42 | 42 | valueOrElse(getInteger(voteKey), 0) | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func getAdminsList () = match getString(this, keyAdminAddressList()) { | |
47 | 47 | case s: String => | |
48 | 48 | split(s, SEP) | |
49 | 49 | case _ => | |
50 | 50 | nil | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | let adminList = getAdminsList() | |
55 | 55 | ||
56 | 56 | func isInAdminList (address) = containsElement(adminList, address) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func genVotesKeysHelper (a,adminAddress) = { | |
60 | 60 | let $t015021526 = a | |
61 | 61 | let result = $t015021526._1 | |
62 | 62 | let prefix = $t015021526._2 | |
63 | 63 | $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix) | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func genVotesKeys (keyPrefix) = { | |
68 | 68 | let $t016371716 = { | |
69 | 69 | let $l = adminList | |
70 | 70 | let $s = size($l) | |
71 | 71 | let $acc0 = $Tuple2(nil, keyPrefix) | |
72 | 72 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
73 | 73 | then $a | |
74 | 74 | else genVotesKeysHelper($a, $l[$i]) | |
75 | 75 | ||
76 | 76 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
77 | 77 | then $a | |
78 | 78 | else throw("List size exceeds 10") | |
79 | 79 | ||
80 | 80 | $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) | |
81 | 81 | } | |
82 | 82 | let result = $t016371716._1 | |
83 | 83 | let prefix = $t016371716._2 | |
84 | 84 | result | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0)) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func countVotes (prefix) = { | |
92 | 92 | let votes = genVotesKeys(prefix) | |
93 | 93 | let $l = votes | |
94 | 94 | let $s = size($l) | |
95 | 95 | let $acc0 = 0 | |
96 | 96 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
97 | 97 | then $a | |
98 | 98 | else countVotesHelper($a, $l[$i]) | |
99 | 99 | ||
100 | 100 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
101 | 101 | then $a | |
102 | 102 | else throw("List size exceeds 10") | |
103 | 103 | ||
104 | 104 | $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) | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func clearVotesHelper (result,key) = (result :+ DeleteEntry(key)) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getClearVoteEntries (prefix) = { | |
112 | 112 | let votes = genVotesKeys(prefix) | |
113 | 113 | let $l = votes | |
114 | 114 | let $s = size($l) | |
115 | 115 | let $acc0 = nil | |
116 | 116 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
117 | 117 | then $a | |
118 | 118 | else clearVotesHelper($a, $l[$i]) | |
119 | 119 | ||
120 | 120 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
121 | 121 | then $a | |
122 | 122 | else throw("List size exceeds 10") | |
123 | 123 | ||
124 | 124 | $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) | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = { | |
129 | 129 | let voteKey = keyFullAdminVote(keyPrefix, callerAddressString) | |
130 | 130 | let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString) | |
131 | 131 | let err = if (!(isInAdminList(callerAddressString))) | |
132 | 132 | then throwErr((("Address: " + callerAddressString) + " not in Admin list")) | |
133 | 133 | else if ((adminCurrentVote == 1)) | |
134 | 134 | then throwErr((voteKey + " you already voted")) | |
135 | 135 | else unit | |
136 | 136 | if ((err == err)) | |
137 | 137 | then { | |
138 | 138 | let votes = countVotes(keyPrefix) | |
139 | 139 | if (((votes + 1) >= minVotes)) | |
140 | 140 | then { | |
141 | 141 | let clearVoteEntries = getClearVoteEntries(keyPrefix) | |
142 | 142 | (clearVoteEntries ++ voteResult) | |
143 | 143 | } | |
144 | 144 | else [IntegerEntry(voteKey, 1)] | |
145 | 145 | } | |
146 | 146 | else throw("Strict value is not equal to itself.") | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func validateAddress (address) = isDefined(addressFromString(address)) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | let kCalculatorAddress = "calculator__address" | |
154 | 154 | ||
155 | 155 | let calculatorAddressOption = match getString(this, kCalculatorAddress) { | |
156 | 156 | case s: String => | |
157 | 157 | addressFromString(s) | |
158 | 158 | case _: Unit => | |
159 | 159 | unit | |
160 | 160 | case _ => | |
161 | 161 | throw("Match error") | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | let calculatorAddress = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address")) | |
165 | 165 | ||
166 | 166 | func mustAddress (i,address) = if ((i.caller == address)) | |
167 | 167 | then true | |
168 | 168 | else throwErr("permission denied") | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func mustThis (i) = mustAddress(i, this) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func mustCalculator (i) = mustAddress(i, calculatorAddress) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func parseAssetId (input) = if ((input == wavesString)) | |
178 | 178 | then unit | |
179 | 179 | else fromBase58String(input) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func assetIdToString (input) = if ((input == unit)) | |
183 | 183 | then wavesString | |
184 | 184 | else toBase58String(value(input)) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | @Callable(i) | |
188 | 188 | func init (calculatorAddressStr) = { | |
189 | 189 | let checkCaller = mustThis(i) | |
190 | 190 | if ((checkCaller == checkCaller)) | |
191 | 191 | then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr), StringEntry(kPriceAsset, wavesString)], unit) | |
192 | 192 | else throw("Strict value is not equal to itself.") | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | ||
197 | 197 | @Callable(i) | |
198 | 198 | func stringEntry (key,val) = if (if (!(shutdown)) | |
199 | 199 | then mustCalculator(i) | |
200 | 200 | else false) | |
201 | 201 | then $Tuple2([StringEntry(key, val)], key) | |
202 | 202 | else throwErr("not allowed") | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | ||
206 | 206 | @Callable(i) | |
207 | 207 | func integerEntry (key,val) = if (if (!(shutdown)) | |
208 | 208 | then mustCalculator(i) | |
209 | 209 | else false) | |
210 | 210 | then $Tuple2([IntegerEntry(key, val)], key) | |
211 | 211 | else throwErr("not allowed") | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | ||
215 | 215 | @Callable(i) | |
216 | 216 | func booleanEntry (key,val) = if (if (!(shutdown)) | |
217 | 217 | then mustCalculator(i) | |
218 | 218 | else false) | |
219 | 219 | then $Tuple2([BooleanEntry(key, val)], key) | |
220 | 220 | else throwErr("not allowed") | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | ||
224 | 224 | @Callable(i) | |
225 | 225 | func binaryEntry (key,val) = if (if (!(shutdown)) | |
226 | 226 | then mustCalculator(i) | |
227 | 227 | else false) | |
228 | 228 | then $Tuple2([BinaryEntry(key, val)], key) | |
229 | 229 | else throwErr("not allowed") | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
233 | 233 | @Callable(i) | |
234 | 234 | func deleteEntry (key) = if (if (!(shutdown)) | |
235 | 235 | then mustCalculator(i) | |
236 | 236 | else false) | |
237 | 237 | then $Tuple2([DeleteEntry(key)], key) | |
238 | 238 | else throwErr("not allowed") | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | ||
242 | 242 | @Callable(i) | |
243 | 243 | func reissue (assetId,amount,reissuable) = if (if (!(shutdown)) | |
244 | 244 | then mustCalculator(i) | |
245 | 245 | else false) | |
246 | 246 | then $Tuple2([Reissue(assetId, amount, reissuable)], amount) | |
247 | 247 | else throwErr("not allowed") | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | ||
251 | 251 | @Callable(i) | |
252 | 252 | func burn (assetId,amount) = if (if (!(shutdown)) | |
253 | 253 | then mustCalculator(i) | |
254 | 254 | else false) | |
255 | 255 | then $Tuple2([Burn(assetId, amount)], amount) | |
256 | 256 | else throwErr("not allowed") | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | ||
260 | 260 | @Callable(i) | |
261 | 261 | func transferAsset (recipientBytes,amount,assetId) = if (if (!(shutdown)) | |
262 | 262 | then mustCalculator(i) | |
263 | 263 | else false) | |
264 | 264 | then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount) | |
265 | 265 | else throwErr("not allowed") | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | ||
269 | 269 | @Callable(i) | |
270 | 270 | func transferAssets (recipientBytes,assetsList,amountsList) = if (if (!(shutdown)) | |
271 | 271 | then mustCalculator(i) | |
272 | 272 | else false) | |
273 | 273 | then { | |
274 | 274 | func addNewTransfer (acc,nextAssetId) = { | |
275 | 275 | let $t059796003 = acc | |
276 | 276 | let transfers = $t059796003._1 | |
277 | 277 | let j = $t059796003._2 | |
278 | 278 | let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j]) | |
279 | 279 | let updatedTransfers = (transfers :+ newTransfer) | |
280 | 280 | $Tuple2(updatedTransfers, (j + 1)) | |
281 | 281 | } | |
282 | 282 | ||
283 | 283 | let $t062406321 = { | |
284 | 284 | let $l = assetsList | |
285 | 285 | let $s = size($l) | |
286 | 286 | let $acc0 = $Tuple2(nil, 0) | |
287 | 287 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
288 | 288 | then $a | |
289 | 289 | else addNewTransfer($a, $l[$i]) | |
290 | 290 | ||
291 | 291 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
292 | 292 | then $a | |
293 | 293 | else throw("List size exceeds 10") | |
294 | 294 | ||
295 | 295 | $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) | |
296 | 296 | } | |
297 | 297 | let assetsTransfers = $t062406321._1 | |
298 | 298 | let _lastIndex = $t062406321._2 | |
299 | 299 | $Tuple2(assetsTransfers, unit) | |
300 | 300 | } | |
301 | 301 | else throwErr("not allowed") | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | ||
305 | 305 | @Callable(i) | |
306 | 306 | func transferWaves (recipientBytes,amount) = if (if (!(shutdown)) | |
307 | 307 | then mustCalculator(i) | |
308 | 308 | else false) | |
309 | 309 | then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount) | |
310 | 310 | else throwErr("not allowed") | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | ||
314 | 314 | @Callable(i) | |
315 | 315 | func call (function,args) = { | |
316 | 316 | let cleanPayments = if ((i.callerPublicKey == base58'11111111111111111111111111111111')) | |
317 | 317 | then nil | |
318 | 318 | else i.payments | |
319 | 319 | let result = reentrantInvoke(calculatorAddress, function, [i.callerPublicKey, args], cleanPayments) | |
320 | 320 | $Tuple2(nil, result) | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | ||
325 | 325 | @Callable(i) | |
326 | 326 | func initPoolInvoke (poolAddressString,args) = if (if (!(shutdown)) | |
327 | 327 | then mustCalculator(i) | |
328 | 328 | else false) | |
329 | 329 | then { | |
330 | 330 | let convertedArgs = [args[0], args[1], args[2], args[3], parseIntValue(args[4])] | |
331 | 331 | $Tuple2(nil, invoke(addressFromStringValue(poolAddressString), "init", convertedArgs, i.payments)) | |
332 | 332 | } | |
333 | 333 | else throwErr("not allowed") | |
334 | 334 | ||
335 | 335 | ||
336 | 336 | ||
337 | 337 | @Callable(i) | |
338 | + | func withdrawLiquidityFromPool (poolAddressString) = if (if (!(shutdown)) | |
339 | + | then mustCalculator(i) | |
340 | + | else false) | |
341 | + | then $Tuple2(nil, invoke(addressFromStringValue(poolAddressString), "withdrawLiquidityAtTarget", nil, nil)) | |
342 | + | else throwErr("not allowed") | |
343 | + | ||
344 | + | ||
345 | + | ||
346 | + | @Callable(i) | |
338 | 347 | func notifyStatusUpdate (status) = { | |
339 | 348 | let result = reentrantInvoke(calculatorAddress, "notifyStatusUpdate", [i.callerPublicKey, [toString(status)]], nil) | |
340 | 349 | $Tuple2(nil, result) | |
341 | 350 | } | |
351 | + | ||
352 | + | ||
353 | + | ||
354 | + | @Callable(i) | |
355 | + | func createWxPool (userPools,asset1Id,asset1Amount,asset2Id,asset2Amount) = if (if (!(shutdown)) | |
356 | + | then mustCalculator(i) | |
357 | + | else false) | |
358 | + | then $Tuple2(nil, invoke(Address(userPools), "create", nil, [AttachedPayment(parseAssetId(asset1Id), asset1Amount), AttachedPayment(parseAssetId(asset2Id), asset2Amount)])) | |
359 | + | else throwErr("not allowed") | |
342 | 360 | ||
343 | 361 | ||
344 | 362 | ||
345 | 363 | @Callable(i) | |
346 | 364 | func voteForTxId (txId) = { | |
347 | 365 | let callerAddressString = toBase58String(i.caller.bytes) | |
348 | 366 | let keyPrefix = keyAllowedTxIdVotePrefix(txId) | |
349 | 367 | let result = [StringEntry(keyAllowedTxId(), txId)] | |
350 | 368 | let allowedTxIdOption = getString(this, keyAllowedTxId()) | |
351 | 369 | let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH)) | |
352 | 370 | then true | |
353 | 371 | else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit)) | |
354 | 372 | then true | |
355 | 373 | else (value(allowedTxIdOption) != txId)) | |
356 | 374 | then true | |
357 | 375 | else throwErr((txId + " is already allowed"))] | |
358 | 376 | if ((err == err)) | |
359 | 377 | then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result) | |
360 | 378 | else throw("Strict value is not equal to itself.") | |
361 | 379 | } | |
362 | 380 | ||
363 | 381 | ||
364 | 382 | @Verifier(tx) | |
365 | 383 | func verify () = { | |
366 | 384 | let byAdmins = (toBase58String(tx.id) == valueOrElse(getString(this, keyAllowedTxId()), "")) | |
367 | 385 | let byOwner = if ((size(adminList) >= QUORUM)) | |
368 | 386 | then false | |
369 | 387 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
370 | 388 | if (byAdmins) | |
371 | 389 | then true | |
372 | 390 | else byOwner | |
373 | 391 | } | |
374 | 392 |
github/deemru/w8io/169f3d6 37.02 ms ◑