tx · 8NJ8iKQHbbmDSqzgDbyDUgB7Bt8k5xz1SwVVbGEzdqi7

3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT:  -0.01800000 Waves

2024.11.21 02:00 [3380401] smart account 3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT > SELF 0.00000000 Waves

{ "type": 13, "id": "8NJ8iKQHbbmDSqzgDbyDUgB7Bt8k5xz1SwVVbGEzdqi7", "fee": 1800000, "feeAssetId": null, "timestamp": 1732143622222, "version": 2, "chainId": 84, "sender": "3MzYJ5tJs1rdz6Pzr7zvyfezTLPuVxFSRvT", "senderPublicKey": "FvkktUPDqYCGhXKDauJAZkkkVp1b5yKhS6NUf7vhP3tR", "proofs": [ "4C1LqarBitXvB72R8Q51NeD112ksePAKD8A19axJC41fWvmU92HSNzy8o2jfRvaTu8BFAevX91ikjWDoat9y4xjM" ], "script": "base64:BgI8CAISAwoBCBIGCgQICAgIEgMKAQgSABIAEgMKAQgSABIDCgEIEgMKAQgSBAoCCAgSAwoBCBIGCgQIAQQIOQENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEJaXNUZXN0RW52AAQHdGVzdGVudgQHJG1hdGNoMAkAmwgCBQR0aGlzAgdURVNURU5WAwkAAQIFByRtYXRjaDACB0Jvb2xlYW4EAXgFByRtYXRjaDAFAXgHBQd0ZXN0ZW52ARVrZXlEdWNrUGxheVVubG9ja1RpbWUBB2Fzc2V0SWQJAKwCAgkArAICAgVkdWNrXwkA2AQBBQdhc3NldElkAgtfdW5sb2NrVGltZQEXa2V5RHVja0ZpbmlzaFVubG9ja1RpbWUBB2Fzc2V0SWQJAKwCAgkArAICAgVkdWNrXwkA2AQBBQdhc3NldElkAhFmaW5pc2hfdW5sb2NrVGltZQEMa2V5RHVja093bmVyAQdhc3NldElkCQCsAgIJAKwCAgIFZHVja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QD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQpzZWNvbmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQpzZWNvbmRVc2VyAAEAAAQPdGhpcmRVc2VyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUJdGhpcmRVc2VyAAEDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQl0aGlyZFVzZXIAAQMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCXRoaXJkVXNlcgABAAAED3NpZ25hdHVyZXNDb3VudAkAZAIJAGQCBQ9maXJzdFVzZXJTaWduZWQFEHNlY29uZFVzZXJTaWduZWQFD3RoaXJkVXNlclNpZ25lZAQHJG1hdGNoMAUCdHgJAGcCBQ9zaWduYXR1cmVzQ291bnQAAiS2xRI=", "height": 3380401, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ae1tuMekqp2Bkcwyxm1gMK5jhNZ8PRuazWjp21kbD9Wv Next: none Diff:
OldNewDifferences
77 case _ =>
88 0
99 }
10+
11+
12+func isTestEnv () = {
13+ let testenv = match getBoolean(this, "TESTENV") {
14+ case x: Boolean =>
15+ x
16+ case _ =>
17+ false
18+ }
19+ testenv
20+ }
1021
1122
1223 func keyDuckPlayUnlockTime (assetId) = (("duck_" + toBase58String(assetId)) + "_unlockTime")
452463 }
453464
454465
466+@Verifier(tx)
467+func verify () = if (isTestEnv())
468+ then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
469+ else {
470+ let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4'
471+ let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8'
472+ let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3'
473+ let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser))
474+ then 1
475+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser))
476+ then 1
477+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser))
478+ then 1
479+ else 0
480+ let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser))
481+ then 1
482+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser))
483+ then 1
484+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser))
485+ then 1
486+ else 0
487+ let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser))
488+ then 1
489+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser))
490+ then 1
491+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser))
492+ then 1
493+ else 0
494+ let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned)
495+ match tx {
496+ case _ =>
497+ (signaturesCount >= 2)
498+ }
499+ }
500+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func tryGetInteger (key) = match getInteger(this, key) {
55 case b: Int =>
66 b
77 case _ =>
88 0
99 }
10+
11+
12+func isTestEnv () = {
13+ let testenv = match getBoolean(this, "TESTENV") {
14+ case x: Boolean =>
15+ x
16+ case _ =>
17+ false
18+ }
19+ testenv
20+ }
1021
1122
1223 func keyDuckPlayUnlockTime (assetId) = (("duck_" + toBase58String(assetId)) + "_unlockTime")
1324
1425
1526 func keyDuckFinishUnlockTime (assetId) = (("duck_" + toBase58String(assetId)) + "finish_unlockTime")
1627
1728
1829 func keyDuckOwner (assetId) = (("duck_" + toBase58String(assetId)) + "_owner")
1930
2031
2132 func keySpotsBought (addressStr) = (("address_" + addressStr) + "_spotsBought")
2233
2334
2435 func keySpotsBusy (addressStr) = (("address_" + addressStr) + "_spotsBusy")
2536
2637
2738 func keyLockedDuckStatus (addressStr,assetIdStr) = (((("address_" + addressStr) + "_lockedDuck_") + assetIdStr) + "_status")
2839
2940
3041 func keyDuckV2 (addressStr,assetIdStr) = (((("address_" + addressStr) + "_lockedDuck_") + assetIdStr) + "_v2")
3142
3243
3344 func getDuckDetails (assetId) = {
3445 let assetName = value(value(assetInfo(assetId)).name)
3546 let assetNameParts = split(assetName, "")
3647 let isJackpot = (assetNameParts[(size(assetNameParts) - 2)] == "J")
3748 let assetColor = if (isJackpot)
3849 then "B"
3950 else assetNameParts[(size(assetNameParts) - 1)]
4051 $Tuple2(assetColor, isJackpot)
4152 }
4253
4354
4455 func tryGetStringExternal (address,key) = match getString(address, key) {
4556 case a: String =>
4657 a
4758 case _ =>
4859 ""
4960 }
5061
5162
5263 func tryGetBoolean (key) = match getBoolean(key) {
5364 case b: Boolean =>
5465 b
5566 case _ =>
5667 false
5768 }
5869
5970
6071 func tryGetString (key) = tryGetStringExternal(this, key)
6172
6273
6374 func staticKey_oracleAddress () = "static_oracleAddress"
6475
6576
6677 func staticKey_eggAssetId () = "static_eggAssetId"
6778
6879
6980 func staticKey_incubatorAddress () = "static_incubatorAddress"
7081
7182
7283 func staticKey_breederAddress () = "static_breederAddress"
7384
7485
7586 func staticKey_farmingAddress () = "static_farmingAddress"
7687
7788
7889 func staticKey_rentingAddress () = "static_rentingAddress"
7990
8091
8192 func staticKey_shortGameName () = "static_shortGameName"
8293
8394
8495 func staticKey_longGameName () = "static_longGameName"
8596
8697
8798 func staticKey_nftName () = "static_nftName"
8899
89100
90101 func staticKey_backendPubKey () = "static_backendPubKey"
91102
92103
93104 func staticKey_accessItemAssetId () = "static_accessItemAssetId"
94105
95106
96107 func staticKey_accessItemPrice () = "static_accessItemPrice"
97108
98109
99110 func staticKey_minLockDuration () = "static_minLockDuration"
100111
101112
102113 func staticKey_UnlockDuration () = "static_UnlockDuration"
103114
104115
105116 func staticKey_boosterBuyAssetId () = "static_boosterBuyAssetId"
106117
107118
108119 func staticKey_extraFee () = "static_extraFee"
109120
110121
111122 func staticKey_feeAggregator () = "static_feeAggregator"
112123
113124
114125 func staticKey_boosterPriceLevel (level) = ("static_boosterPriceLevel_" + level)
115126
116127
117128 func staticKey_boosterName (level) = ("static_boosterName_" + level)
118129
119130
120131 func staticKey_burnAddress () = "static_burnAddress"
121132
122133
123134 func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress())))
124135
125136
126137 func getGameName () = valueOrErrorMessage(getString(staticKey_shortGameName()), "3GGN: There is no game name defined!")
127138
128139
129140 func getLongGameName () = valueOrErrorMessage(getString(staticKey_longGameName()), "3GLGN: There is no long game name defined!")
130141
131142
132143 func getNFTName () = valueOrErrorMessage(getString(staticKey_nftName()), "3GNN: There is no nft name defined!")
133144
134145
135146 func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_incubatorAddress())))
136147
137148
138149 func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress())))
139150
140151
141152 func getRentingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_rentingAddress())))
142153
143154
144155 func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_farmingAddress())))
145156
146157
147158 func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId()))
148159
149160
150161 func getBackendPubKey () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_backendPubKey()))
151162
152163
153164 func getFeeAggregator () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_feeAggregator())))
154165
155166
156167 func getBurnAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_burnAddress())))
157168
158169
159170 func getAccessItemAssetId () = fromBase58String(tryGetString(staticKey_accessItemAssetId()))
160171
161172
162173 func getAccessItemPrice () = tryGetInteger(staticKey_accessItemPrice())
163174
164175
165176 func getMinLockDuration () = tryGetInteger(staticKey_minLockDuration())
166177
167178
168179 func getUnlockDuration () = tryGetInteger(staticKey_UnlockDuration())
169180
170181
171182 func getBosterBuyAssetId () = fromBase58String(tryGetString(staticKey_boosterBuyAssetId()))
172183
173184
174185 func getBosterPriceForLevel (level) = valueOrErrorMessage(getInteger(staticKey_boosterPriceLevel(toString(level))), "3GBPFL: There is no price value for this level of booster")
175186
176187
177188 func getBosterNameForLevel (level) = valueOrErrorMessage(getString(staticKey_boosterName(toString(level))), "3GBNFL: There is no such booster")
178189
179190
180191 func checkAdditionalPayment (payment) = if (isDefined(payment.assetId))
181192 then throw("RCAP: Please attach waves")
182193 else {
183194 let feeAmount = getIntegerValue(getOracle(), staticKey_extraFee())
184195 if ((payment.amount != feeAmount))
185196 then throw((("RCAP: Please attach exactly " + toString(feeAmount)) + " amount of wavelets"))
186197 else [ScriptTransfer(getFeeAggregator(), feeAmount, unit)]
187198 }
188199
189200
190201 func asString (value) = match value {
191202 case string: String =>
192203 string
193204 case _ =>
194205 throw("3AS: wrong type, expected: String")
195206 }
196207
197208
198209 func lockDuckInternal (addressStr,takeSpotsFrom,pmt) = {
199210 let assetId = value(pmt.assetId)
200211 let assetIssuer = value(assetInfo(assetId)).issuer
201212 let tDuckDetails = getDuckDetails(assetId)
202213 let assetColor = tDuckDetails._1
203214 let isJackpot = tDuckDetails._2
204215 let kSpotsBusy = keySpotsBusy(takeSpotsFrom)
205216 let spotsBusy = tryGetInteger(kSpotsBusy)
206217 let kSpotsBought = keySpotsBought(takeSpotsFrom)
207218 let addressSpotsAvailable = (tryGetInteger(kSpotsBought) - spotsBusy)
208219 if ((pmt.amount != 1))
209220 then throw("NFT is not attached")
210221 else if (if ((assetIssuer != getIncubatorAddress()))
211222 then (assetIssuer != getBreederAddress())
212223 else false)
213224 then throw("ivalid NFT attached")
214225 else if ((0 >= addressSpotsAvailable))
215226 then throw(("No spots available in hunt for: " + takeSpotsFrom))
216227 else {
217228 let kPerchesAvailable = ((("address_" + toString(this)) + "_perchesAvailable_") + assetColor)
218229 let perchesAvailable = match getInteger(getFarmingAddress(), kPerchesAvailable) {
219230 case b: Int =>
220231 b
221232 case _ =>
222233 0
223234 }
224235 if ((perchesAvailable == perchesAvailable))
225236 then {
226237 let eggAssetId = getEggAssetId()
227238 [IntegerEntry(kSpotsBusy, (spotsBusy + 1)), StringEntry(keyDuckOwner(assetId), addressStr), BooleanEntry(keyLockedDuckStatus(addressStr, toBase58String(assetId)), true), IntegerEntry(keyDuckPlayUnlockTime(assetId), (lastBlock.timestamp + getMinLockDuration())), BooleanEntry(keyDuckV2(addressStr, toBase58String(assetId)), true)]
228239 }
229240 else throw("Strict value is not equal to itself.")
230241 }
231242 }
232243
233244
234245 func initUnlockDuck (assetIdStr,addressStr) = {
235246 let assetId = fromBase58String(assetIdStr)
236247 let tDuckDetails = getDuckDetails(assetId)
237248 let assetColor = tDuckDetails._1
238249 let isJackpot = tDuckDetails._2
239250 let kSpotsBusy = keySpotsBusy(addressStr)
240251 let kDuckOwner = keyDuckOwner(assetId)
241252 let remainingForUnlock = (tryGetInteger(keyDuckPlayUnlockTime(assetId)) - lastBlock.timestamp)
242253 if ((tryGetString(kDuckOwner) != addressStr))
243254 then throw("3IULD: The duck is not yours")
244255 else if ((remainingForUnlock > 0))
245256 then throw((("3IUL: You need to wait to unlock " + toString((remainingForUnlock / 1000))) + " seconds"))
246257 else [IntegerEntry(keyDuckFinishUnlockTime(assetId), (lastBlock.timestamp + getUnlockDuration()))]
247258 }
248259
249260
250261 func unstakeDuck (assetIdStr,addressStr,addSpotsTowards) = {
251262 let assetId = fromBase58String(assetIdStr)
252263 let tDuckDetails = getDuckDetails(assetId)
253264 let assetColor = tDuckDetails._1
254265 let isJackpot = tDuckDetails._2
255266 let kSpotsBusy = keySpotsBusy(addSpotsTowards)
256267 let kDuckOwner = keyDuckOwner(assetId)
257268 let remainingForUnlock = (tryGetInteger(keyDuckFinishUnlockTime(assetId)) - lastBlock.timestamp)
258269 if ((tryGetString(kDuckOwner) != addressStr))
259270 then throw("3UD: The duck is not yours")
260271 else if ((remainingForUnlock > 0))
261272 then throw((("3UD: You need to wait to unlock " + toString((remainingForUnlock / 1000))) + " seconds"))
262273 else [ScriptTransfer(Address(fromBase58String(addressStr)), 1, assetId), DeleteEntry(keyLockedDuckStatus(addressStr, assetIdStr)), DeleteEntry(kDuckOwner), IntegerEntry(kSpotsBusy, (tryGetInteger(kSpotsBusy) - 1))]
263274 }
264275
265276
266277 @Callable(i)
267278 func buyAccessItemInternal (addressStr) = if ((i.caller != this))
268279 then throw("3BAII: internal use only")
269280 else {
270281 let issueAccessItem = Issue(("ACCESS-" + getGameName()), ((("[Access] " + getLongGameName()) + " access NFT for ") + getNFTName()), 1, 0, false)
271282 let accessRaceAssetId = toBase58String(calculateAssetId(issueAccessItem))
272283 let kSpotsBought = keySpotsBought(addressStr)
273284 $Tuple2([issueAccessItem, StringEntry((("accessItem_" + accessRaceAssetId) + "_owner"), addressStr), StringEntry((("address_" + addressStr) + "_owning"), accessRaceAssetId), IntegerEntry(kSpotsBought, (tryGetInteger(kSpotsBought) + 1))], accessRaceAssetId)
274285 }
275286
276287
277288
278289 @Callable(i)
279290 func configureOracle (oracle,shortname,longname,nftName) = if ((i.caller != this))
280291 then throw("3CO: admin only")
281292 else [StringEntry("static_oracleAddress", oracle), StringEntry("static_shortGameName", shortname), StringEntry("static_longGameName", longname), StringEntry("static_nftName", nftName)]
282293
283294
284295
285296 @Callable(i)
286297 func deleteSetting (key) = if ((i.caller != this))
287298 then throw("3DS: Only administrator can call this method")
288299 else [DeleteEntry(key)]
289300
290301
291302
292303 @Callable(i)
293304 func buyAccessItemAndLockDuck () = {
294305 let eggPayment = value(i.payments[0])
295306 let duckPayment = value(i.payments[1])
296307 let addressStr = toString(i.originCaller)
297308 if ((eggPayment.assetId != getAccessItemAssetId()))
298309 then throw("3BAI: Wrong asset attached")
299310 else if ((eggPayment.amount != getAccessItemPrice()))
300311 then throw("3BAI: Wrong amount of assets attached")
301312 else {
302313 let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressStr], nil))
303314 if ((accessItemData == accessItemData))
304315 then {
305316 let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)])
306317 if ((burnCall == burnCall))
307318 then {
308319 let validPayment = if ((i.caller == getRentingAddress()))
309320 then nil
310321 else checkAdditionalPayment(i.payments[2])
311322 if ((validPayment == validPayment))
312323 then {
313324 let lockData = (lockDuckInternal(addressStr, addressStr, duckPayment) ++ validPayment)
314325 $Tuple2(lockData, accessItemData)
315326 }
316327 else throw("Strict value is not equal to itself.")
317328 }
318329 else throw("Strict value is not equal to itself.")
319330 }
320331 else throw("Strict value is not equal to itself.")
321332 }
322333 }
323334
324335
325336
326337 @Callable(i)
327338 func buyAccessItem () = {
328339 let addressStr = toString(i.originCaller)
329340 let eggPayment = value(i.payments[0])
330341 if ((eggPayment.assetId != getAccessItemAssetId()))
331342 then throw(("3BAI: Wrong asset attached " + toBase58String(getAccessItemAssetId())))
332343 else if ((eggPayment.amount != getAccessItemPrice()))
333344 then throw("3BAI: Wrong amount of assets attached")
334345 else {
335346 let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressStr], nil))
336347 if ((accessItemData == accessItemData))
337348 then {
338349 let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)])
339350 if ((burnCall == burnCall))
340351 then {
341352 let validPayment = if ((i.caller == getRentingAddress()))
342353 then nil
343354 else checkAdditionalPayment(i.payments[1])
344355 if ((validPayment == validPayment))
345356 then $Tuple2(validPayment, accessItemData)
346357 else throw("Strict value is not equal to itself.")
347358 }
348359 else throw("Strict value is not equal to itself.")
349360 }
350361 else throw("Strict value is not equal to itself.")
351362 }
352363 }
353364
354365
355366
356367 @Callable(i)
357368 func buyAccessItemOther (addressOther) = {
358369 let eggPayment = value(i.payments[0])
359370 if ((eggPayment.assetId != getAccessItemAssetId()))
360371 then throw("3BAI: Wrong asset attached")
361372 else if ((eggPayment.amount != getAccessItemPrice()))
362373 then throw("3BAI: Wrong amount of assets attached")
363374 else {
364375 let accessItemData = asString(invoke(this, "buyAccessItemInternal", [addressOther], nil))
365376 if ((accessItemData == accessItemData))
366377 then {
367378 let burnCall = invoke(getBurnAddress(), "burnAttachedPayments", nil, [AttachedPayment(getEggAssetId(), eggPayment.amount)])
368379 if ((burnCall == burnCall))
369380 then $Tuple2(nil, accessItemData)
370381 else throw("Strict value is not equal to itself.")
371382 }
372383 else throw("Strict value is not equal to itself.")
373384 }
374385 }
375386
376387
377388
378389 @Callable(i)
379390 func lockDuck () = {
380391 let addressStr = toString(i.originCaller)
381392 let duckPayment = value(i.payments[0])
382393 let validPayment = checkAdditionalPayment(i.payments[1])
383394 if ((validPayment == validPayment))
384395 then (lockDuckInternal(addressStr, addressStr, duckPayment) ++ validPayment)
385396 else throw("Strict value is not equal to itself.")
386397 }
387398
388399
389400
390401 @Callable(i)
391402 func initUnlock (assetIdStr) = {
392403 let addressStr = toString(i.caller)
393404 let validPayment = checkAdditionalPayment(i.payments[0])
394405 if ((validPayment == validPayment))
395406 then (initUnlockDuck(assetIdStr, addressStr) ++ validPayment)
396407 else throw("Strict value is not equal to itself.")
397408 }
398409
399410
400411
401412 @Callable(i)
402413 func lockDuckRenting (addressTakeSpotsFrom) = if ((i.caller != getRentingAddress()))
403414 then throw("3UDO: Renting only!")
404415 else {
405416 let addressStr = toString(i.caller)
406417 let duckPayment = value(i.payments[0])
407418 lockDuckInternal(addressStr, addressTakeSpotsFrom, duckPayment)
408419 }
409420
410421
411422
412423 @Callable(i)
413424 func unlockDuckRenting (assetIdStr,addSpotsTowards) = if ((i.caller != getRentingAddress()))
414425 then throw("3UDO: Renting only!")
415426 else {
416427 let addressStr = toString(i.caller)
417428 unstakeDuck(assetIdStr, addressStr, addSpotsTowards)
418429 }
419430
420431
421432
422433 @Callable(i)
423434 func unlockDuckOther (assetIdStr) = if ((i.caller != this))
424435 then throw("3UDO: Admin only!")
425436 else {
426437 let ownerKey = tryGetString(keyDuckOwner(fromBase58String(assetIdStr)))
427438 unstakeDuck(assetIdStr, ownerKey, ownerKey)
428439 }
429440
430441
431442
432443 @Callable(i)
433444 func unlockDuck (assetIdStr,ts,allowed,signature) = if ((allowed != true))
434445 then throw("3UD: Not allowed to unlock the duck!")
435446 else {
436447 let MSINHOUR = 3600000
437448 let currentTs = lastBlock.timestamp
438449 if ((currentTs > (ts + MSINHOUR)))
439450 then throw("3UD: Outdated signature!")
440451 else {
441452 let addressStr = toString(i.caller)
442453 let text = makeString([assetIdStr, toString(ts), toString(allowed)], ";")
443454 if (!(sigVerify_8Kb(toBytes(text), fromBase58String(signature), getBackendPubKey())))
444455 then throw(((("3UD: Invalid proof from backend key" + toBase58String(getBackendPubKey())) + " ") + text))
445456 else {
446457 let validPayment = checkAdditionalPayment(i.payments[0])
447458 if ((validPayment == validPayment))
448459 then (unstakeDuck(assetIdStr, addressStr, addressStr) ++ validPayment)
449460 else throw("Strict value is not equal to itself.")
450461 }
451462 }
452463 }
453464
454465
466+@Verifier(tx)
467+func verify () = if (isTestEnv())
468+ then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
469+ else {
470+ let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4'
471+ let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8'
472+ let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3'
473+ let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser))
474+ then 1
475+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser))
476+ then 1
477+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser))
478+ then 1
479+ else 0
480+ let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser))
481+ then 1
482+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser))
483+ then 1
484+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser))
485+ then 1
486+ else 0
487+ let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser))
488+ then 1
489+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser))
490+ then 1
491+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser))
492+ then 1
493+ else 0
494+ let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned)
495+ match tx {
496+ case _ =>
497+ (signaturesCount >= 2)
498+ }
499+ }
500+

github/deemru/w8io/026f985 
47.00 ms