tx · BvJTFUc4shiuPg78wudLfkocL3tRLUHbNAQN8THF2nu4

3MuqV3gg1FJEvH1HtnXGUyz6UrWRnsXaToV:  -0.01400000 Waves

2021.11.17 20:55 [1795366] smart account 3MuqV3gg1FJEvH1HtnXGUyz6UrWRnsXaToV > SELF 0.00000000 Waves

{ "type": 13, "id": "BvJTFUc4shiuPg78wudLfkocL3tRLUHbNAQN8THF2nu4", "fee": 1400000, "feeAssetId": null, "timestamp": 1637171819398, "version": 2, "chainId": 84, "sender": "3MuqV3gg1FJEvH1HtnXGUyz6UrWRnsXaToV", "senderPublicKey": "4gZSiHTXLqvVnQHqBYUXzF6WzhsRjKtmrDsE16qzqhwY", "proofs": [ "LoNTAqoX7DuQeLb4zrAexa8Pi8tRtVBXJmyoXgcWWQAWTq4FoFkmWiFLRyvKJQuVxLvmHvDk8Lv2JNpvfSVU2DR" ], "script": "base64:AAIDAAAAAAAAAAIIAQAAAAQAAAAADm93bmVyUHVibGljS2V5AQAAACDjdpDZfYgrrg/nUfr50oct2OmioeaKZBuTxnblcq31bQAAAAALcHViS2V5QWxpY2UBAAAAION2kNl9iCuuD+dR+vnShy3Y6aKh5opkG5PGduVyrfVtAAAAAAlwdWJLZXlCb2IBAAAAIDa1ZWaZ73UPtag5GYsmJe7WHHxEAiUv7UsND2rGs9BLAAAAAAxwdWJLZXlDb29wZXIBAAAAIH9oa9B9vtha1Ue3FdhREE8cTHF3Oh6dSIGmqljCxUx+AAAAAAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAC3NpZ25lZEFsaWNlAwMDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAALcHViS2V5QWxpY2UGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAALcHViS2V5QWxpY2UGCQAB9AAA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AABkAAAAAgkAAGQAAAACBQAAAAtzaWduZWRBbGljZQUAAAAJc2lnbmVkQm9iBQAAAAxzaWduZWRDb29wZXIAAAAAAAAAAALhtNA0", "height": 1795366, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C21kwfW4JZzfW2Fr1pbHU4mhCtSyVYx8DVfeyJHNgXTY Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let ownerPublicKey = base58'GJvQeBDAzLZepewd7B4tjh4xxDTZ3jJjGAgLu61GpiEp'
45
6+let pubKeyAlice = base58'GJvQeBDAzLZepewd7B4tjh4xxDTZ3jJjGAgLu61GpiEp'
57
6-@Callable(i)
7-func purchase () = {
8- let pmt = extract(i.payment)
9- if (isDefined(pmt.assetId))
10- then throw("can use WAVES only as the moment")
11- else {
12- let customerAddress = toBase58String(i.caller.bytes)
13- let price = match getInteger(this, "item_A_coupon_price") {
14- case a: Int =>
15- a
16- case _ =>
17- 0
18- }
19- if ((price > pmt.amount))
20- then throw("purchase amoun cannot be less than item price")
21- else if ((pmt.amount > price))
22- then throw("purchase amoun cannot be higher than item price")
23- else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
24- }
25- }
8+let pubKeyBob = base58'4gZSiHTXLqvVnQHqBYUXzF6WzhsRjKtmrDsE16qzqhwY'
9+
10+let pubKeyCooper = base58'9aM8SJLh6kk8WtQgpXNSsyER2AhHSuTc84bAyuKGcmtR'
2611
2712
2813 @Verifier(tx)
29-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
14+func verify () = {
15+ let signedAlice = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyAlice))
16+ then true
17+ else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyAlice))
18+ then true
19+ else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyAlice))
20+ then 1
21+ else 0
22+ let signedBob = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyBob))
23+ then true
24+ else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyBob))
25+ then true
26+ else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyBob))
27+ then 1
28+ else 0
29+ let signedCooper = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyCooper))
30+ then true
31+ else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyCooper))
32+ then 1
33+ else 0
34+ match tx {
35+ case d: SetScriptTransaction =>
36+ sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey)
37+ case d: DataTransaction =>
38+ true
39+ case _ =>
40+ (((signedAlice + signedBob) + signedCooper) >= 2)
41+ }
42+ }
3043

github/deemru/w8io/169f3d6 
38.04 ms