tx · JDH7UDHE9VE5ZfLegcztk1VU9whE6ec2q6GkZS6aoYzK

3N2Q9TfYZcenz5a3on97GLEAasz21EkKMAa:  -0.01400000 Waves

2021.11.17 19:01 [1795252] smart account 3N2Q9TfYZcenz5a3on97GLEAasz21EkKMAa > SELF 0.00000000 Waves

{ "type": 13, "id": "JDH7UDHE9VE5ZfLegcztk1VU9whE6ec2q6GkZS6aoYzK", "fee": 1400000, "feeAssetId": null, "timestamp": 1637164878122, "version": 2, "chainId": 84, "sender": "3N2Q9TfYZcenz5a3on97GLEAasz21EkKMAa", "senderPublicKey": "7xnAFC7PqCyLRjzmjyaTmSK7H1bEBfSx6qnj7JBj6XJe", "proofs": [ "5x6D663WCtPQoE9wCtzWfcyuYshnqFNtzUkvZ7rDWjNXzJ1PyAu9vnVCWh5jHv72tJPKqreLUWM5vCpoohAxesaq" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAABAAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIGdwIMDn68lL32eMqLRKIY/1dabJUxYb0aJsAxWhhGsfAAAAAAtwdWJLZXlBbGljZQEAAAAg43aQ2X2IK64P51H6+dKHLdjpoqHmimQbk8Z25XKt9W0AAAAACXB1YktleUJvYgEAAAAgNrVlZpnvdQ+1qDkZiyYl7tYcfEQCJS/tSw0Pasaz0EsAAAAADHB1YktleUNvb3BlcgEAAAAgf2hr0H2+2FrVR7cV2FEQTxxMcXc6Hp1IgaaqWMLFTH4AAAABAAAAAWkBAAAACHB1cmNoYXNlAAAAAAQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAHEF0dGFjaGVkIHBheW1lbnQgaXMgcmVxdWlyZWQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIGNhbiB1c2UgV0FWR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vbgQAAAABZAUAAAAHJG1hdGNoMAYJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAC3NpZ25lZEFsaWNlBQAAAAlzaWduZWRCb2IFAAAADHNpZ25lZENvb3BlcgAAAAAAAAAAAjfo28E=", "height": 1795252, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8LX6Z6mcnEsFq8ZpSh2aPhyGDo8NManaFmc6w5146yD5 Next: B3ZyXeDYXmfQdoAPiHgyRMe3QeL5xfCpo14aTCNEcA9u Diff:
OldNewDifferences
3535
3636 @Verifier(tx)
3737 func verify () = {
38- let a = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyAlice))
38+ let signedAlice = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyAlice))
3939 then true
4040 else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyAlice))
4141 then true
4242 else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyAlice))
4343 then 1
4444 else 0
45- let b = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyBob))
45+ let signedBob = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyBob))
4646 then true
4747 else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyBob))
4848 then true
4949 else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyBob))
5050 then 1
5151 else 0
52- let c = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyCooper))
52+ let signedCooper = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyCooper))
5353 then true
54- else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyCooper))
54+ else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyCooper))
5555 then 1
5656 else 0
5757 match tx {
6060 case d: DataTransaction =>
6161 true
6262 case _ =>
63- (((a + b) + c) >= 2)
63+ (((signedAlice + signedBob) + signedCooper) >= 2)
6464 }
6565 }
6666
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ownerPublicKey = base58'7xnAFC7PqCyLRjzmjyaTmSK7H1bEBfSx6qnj7JBj6XJe'
55
66 let pubKeyAlice = base58'GJvQeBDAzLZepewd7B4tjh4xxDTZ3jJjGAgLu61GpiEp'
77
88 let pubKeyBob = base58'4gZSiHTXLqvVnQHqBYUXzF6WzhsRjKtmrDsE16qzqhwY'
99
1010 let pubKeyCooper = base58'9aM8SJLh6kk8WtQgpXNSsyER2AhHSuTc84bAyuKGcmtR'
1111
1212 @Callable(i)
1313 func purchase () = {
1414 let pmt = if ((size(i.payments) == 1))
1515 then i.payments[0]
1616 else throw("Attached payment is required")
1717 if (isDefined(pmt.assetId))
1818 then throw("can use WAVES only as the moment")
1919 else {
2020 let customerAddress = toBase58String(i.caller.bytes)
2121 let price = match getInteger(this, "item_A_coupon_price") {
2222 case a: Int =>
2323 a
2424 case _ =>
2525 0
2626 }
2727 if ((price > pmt.amount))
2828 then throw("purchase amoun cannot be less than item price")
2929 else if ((pmt.amount > price))
3030 then throw("purchase amoun cannot be higher than item price")
3131 else [StringEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + customerAddress), price)]
3232 }
3333 }
3434
3535
3636 @Verifier(tx)
3737 func verify () = {
38- let a = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyAlice))
38+ let signedAlice = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyAlice))
3939 then true
4040 else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyAlice))
4141 then true
4242 else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyAlice))
4343 then 1
4444 else 0
45- let b = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyBob))
45+ let signedBob = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyBob))
4646 then true
4747 else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyBob))
4848 then true
4949 else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyBob))
5050 then 1
5151 else 0
52- let c = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyCooper))
52+ let signedCooper = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyCooper))
5353 then true
54- else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyCooper))
54+ else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyCooper))
5555 then 1
5656 else 0
5757 match tx {
5858 case d: SetScriptTransaction =>
5959 sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey)
6060 case d: DataTransaction =>
6161 true
6262 case _ =>
63- (((a + b) + c) >= 2)
63+ (((signedAlice + signedBob) + signedCooper) >= 2)
6464 }
6565 }
6666

github/deemru/w8io/169f3d6 
29.82 ms