tx · 91s2thywE15BQiDD45D47E5gAuceZNP7RbDY8DMkBrVo

3Mrd8XQ7fiX6MErT8vfA2SSCjYEXemgT7Xk:  -0.01000000 Waves

2021.01.20 23:26 [1362232] smart account 3Mrd8XQ7fiX6MErT8vfA2SSCjYEXemgT7Xk > SELF 0.00000000 Waves

{ "type": 13, "id": "91s2thywE15BQiDD45D47E5gAuceZNP7RbDY8DMkBrVo", "fee": 1000000, "feeAssetId": null, "timestamp": 1611174419300, "version": 2, "chainId": 84, "sender": "3Mrd8XQ7fiX6MErT8vfA2SSCjYEXemgT7Xk", "senderPublicKey": "2sRH9uyWj4KnKzLTybkSTrWddyobCQ2u1s1Zasyp56Hm", "proofs": [ "55exQC8D4M1TWjGT26g9Hp9U56ii1qyNvx4Ti51mcH843BXKQCFQecAkfPCkpQaLNu5vzXQAJSdpiMdnnd9UfBEB" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAwAAAAALYWxpY2VQdWJLZXkBAAAAIA0VlSh8xIiLukkHtUMpRkqoYmMHv54NDLuz7kTx5oBUAAAAAAlib2JQdWJLZXkBAAAAIPDOlT35GtLPUVIxDFPmf+3+mwM/IzsvxPU9NnB63IBYAAAAAAxjb29wZXJQdWJLZXkBAAAAIPXz23J15ZWerEVc9FaHnjU3mQ7O6kvTCwP/TO4HV4wkAAAAAQAAAAFpAQAAAAhwdXJjaGFzZQAAAAEAAAAEaXRlbQQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAEkNhbiBvbmx5IHVzZSBXYXZlcwQAAAAPY3VzdG9tZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABXByaWNlBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgkAASwAAAACAgAAAAVpd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lcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAthbGljZVB1YktleQAAAAAAAAAAAQAAAAAAAAAAAAQAAAAJYm9iU2lnbmVkAwMDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAJYm9iUHViS2V5BgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAACWJvYlB1YktleQYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAlib2JQdWJLZXkAAAAAAAAAAAEAAAAAAAAAAAAEAAAADGNvb3BlclNpZ25lZAMDAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGNvb3BlclB1YktleQYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABBQAAAAxjb29wZXJQdWJLZXkGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAMY29vcGVyUHViS2V5AAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAAAthbGljZVNpZ25lZAUAAAAJYm9iU2lnbmVkBQAAAAxjb29wZXJTaWduZWQAAAAAAAAAAALKipgQ", "height": 1362232, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let alicePubKey = base58't5PVp6CkZwpPk7TtbwqeqHTCrGdzwMfwZadPzSYRAsm'
5+
6+let bobPubKey = base58'HD1Yvs87GYi3sYdqmZhSPR7QGYefPp3RAb8LQQyGQpJT'
7+
8+let cooperPubKey = base58'HZ6ZANLnmTe1YySS8m7dRdPACVTdiWq4HauEmkEw22W7'
9+
10+@Callable(i)
11+func purchase (item) = {
12+ let pmt = extract(i.payment)
13+ if (isDefined(pmt.assetId))
14+ then throw("Can only use Waves")
15+ else {
16+ let customerAddress = toBase58String(i.caller.bytes)
17+ let price = match getInteger(this, (("item_" + item) + "_price")) {
18+ case a: Int =>
19+ a
20+ case _ =>
21+ 0
22+ }
23+ if ((price == 0))
24+ then throw("Coupon not found")
25+ else if ((price > pmt.amount))
26+ then throw("Payment sent is not enough")
27+ else if ((pmt.amount > price))
28+ then throw("Payment sent is too much")
29+ else WriteSet([DataEntry(((("status:purchase_item_" + item) + "_customer_") + customerAddress), "confirmed"), DataEntry(((("price:purchase_item_" + item) + "_customer_") + customerAddress), price)])
30+ }
31+ }
32+
33+
34+@Verifier(tx)
35+func multisig () = {
36+ let aliceSigned = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey))
37+ then true
38+ else sigVerify(tx.bodyBytes, tx.proofs[1], alicePubKey))
39+ then true
40+ else sigVerify(tx.bodyBytes, tx.proofs[2], alicePubKey))
41+ then 1
42+ else 0
43+ let bobSigned = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], bobPubKey))
44+ then true
45+ else sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey))
46+ then true
47+ else sigVerify(tx.bodyBytes, tx.proofs[2], bobPubKey))
48+ then 1
49+ else 0
50+ let cooperSigned = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey))
51+ then true
52+ else sigVerify(tx.bodyBytes, tx.proofs[1], cooperPubKey))
53+ then true
54+ else sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubKey))
55+ then 1
56+ else 0
57+ (((aliceSigned + bobSigned) + cooperSigned) >= 2)
58+ }
59+

github/deemru/w8io/169f3d6 
31.59 ms