tx · 229rbajiUPqwNJvUMHGvDejviJCNKyLNKWoGgx48wev9

3MtQkMWXmyk75gyiPQYQ1DVxkkH77Lx1UiC:  -0.01000010 Waves

2021.07.09 10:19 [1605768] smart account 3MtQkMWXmyk75gyiPQYQ1DVxkkH77Lx1UiC > SELF 0.00000000 Waves

{ "type": 13, "id": "229rbajiUPqwNJvUMHGvDejviJCNKyLNKWoGgx48wev9", "fee": 1000010, "feeAssetId": null, "timestamp": 1625815204679, "version": 2, "chainId": 84, "sender": "3MtQkMWXmyk75gyiPQYQ1DVxkkH77Lx1UiC", "senderPublicKey": "8UvjHec36rwS9JM87dRzE1JP6USH4jKZjfdNDPPb9k7Y", "proofs": [ "4MhjasRoTznpPFaFotL5mjWX2HnphuLrNPLRytdTSKkdVK5B5BDRDWzfhuYVkDxKKBW7hsXMBQJj4BxxwiW5HHS6" ], "script": "base64:AAIFAAAAAAAAAXUIAhIDCgEIGhQKAmExEg5hbGljZVB1YmxpY0tleRoSCgJhMhIMYm9iUHVibGljS2V5GhUKAmEzEg9jb29wZXJQdWJsaWNLZXkaBwoCYTQSAWkaCwoCYTUSBXZhbHVlGgkKAmE2EgNwbXQaFQoCYTcSD2N1c3RvbWVyQWRkcmVzcxoLCgJhOBIFcHJpY2UaDQoCYTkSByRtYXRjaDAaBwoCYjESAWEaCAoCYjISAnR4GgwKAmIzEgZ2ZXJpZnkaDAoCYjQSBmFsaWNlMRoMCgJiNRIGYWxpY2UyGgwKAmI2EgZhbGljZTMaCgoCYjcSBGJvYjEaCgoCYjgSBGJvYjIaCgoCYjkSBGJvYjMaDQoCYzESB2Nvb3BlcjEaDQoCYzISB2Nvb3BlcjIaDQoCYzMSB2Nvb3BlcjMaEQoCYzQSC2FsaWNlQW5kQm9iGhQKAmM1Eg5hbGljZUFuZENvb3BlchoSCgJjNhIMYm9iQW5kQ29vcGVyAAAAAwAAAAACYTEBAAAAIIFjNg4JDYpc0mhGg5E24HBN6Iu+SCh4dUNiYDVxCWgGAAAAAAJh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JiNAUAAAACYzIHBgMFAAAAAmI0BQAAAAJjMwcGAwUAAAACYjUFAAAAAmMxBwYDBQAAAAJiNQUAAAACYzMHBgMFAAAAAmI2BQAAAAJjMQcGAwUAAAACYjYFAAAAAmMyBwQAAAACYzYDAwMDAwMFAAAAAmMxBQAAAAJiOAcGAwUAAAACYzEFAAAAAmI5BwYDBQAAAAJjMgUAAAACYjcHBgMFAAAAAmMyBQAAAAJiOQcGAwUAAAACYzMFAAAAAmI3BwYDBQAAAAJjMwUAAAACYjgHBAAAAAJhOQUAAAACYjIDAwUAAAACYzQGBQAAAAJjNQYFAAAAAmM2BNsWsA==", "height": 1605768, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let alicePublicKey = base58'9i5LUpffkGkS4KAaTQETMmkz3pZBKAc3RfdvA2ts1zQD'
5+
6+let bobPublicKey = base58'8JsUcTBjLG224wakpKMMVL487E4zXGcjaf5yvazsWzgb'
7+
8+let cooperPublicKey = base58'GDLddFGLaV9BpXq64xExRygwVae6peeoynGmb9wrqLri'
9+
10+@Callable(i)
11+func purchase (value) = {
12+ let pmt = i.payments[0]
13+ if (isDefined(pmt.assetId))
14+ then throw("can use WAVES only at the moment")
15+ else {
16+ let customerAddress = toBase58String(i.caller.bytes)
17+ let price = match getInteger(this, "item_A_coupon_price") {
18+ case a: Int =>
19+ a
20+ case _ =>
21+ 0
22+ }
23+ if ((pmt.amount > price))
24+ then throw("too much")
25+ else if ((price > pmt.amount))
26+ then throw("too less")
27+ else [StringEntry(((("status:purchase_item_" + value) + "_customer_") + customerAddress), "confirmed"), IntegerEntry(((("price:purchase_item_" + value) + "_customer_") + customerAddress), price)]
28+ }
29+ }
30+
31+
32+@Verifier(tx)
33+func verify () = {
34+ let alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], alicePublicKey)
35+ let alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], alicePublicKey)
36+ let alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], alicePublicKey)
37+ let bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPublicKey)
38+ let bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPublicKey)
39+ let bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPublicKey)
40+ let cooper1 = sigVerify(tx.bodyBytes, tx.proofs[0], cooperPublicKey)
41+ let cooper2 = sigVerify(tx.bodyBytes, tx.proofs[1], cooperPublicKey)
42+ let cooper3 = sigVerify(tx.bodyBytes, tx.proofs[2], cooperPublicKey)
43+ let aliceAndBob = if (if (if (if (if (if (alice1)
44+ then bob2
45+ else false)
46+ then true
47+ else if (alice1)
48+ then bob3
49+ else false)
50+ then true
51+ else if (alice2)
52+ then bob1
53+ else false)
54+ then true
55+ else if (alice2)
56+ then bob3
57+ else false)
58+ then true
59+ else if (alice3)
60+ then bob1
61+ else false)
62+ then true
63+ else if (alice3)
64+ then bob2
65+ else false
66+ let aliceAndCooper = if (if (if (if (if (if (alice1)
67+ then cooper2
68+ else false)
69+ then true
70+ else if (alice1)
71+ then cooper3
72+ else false)
73+ then true
74+ else if (alice2)
75+ then cooper1
76+ else false)
77+ then true
78+ else if (alice2)
79+ then cooper3
80+ else false)
81+ then true
82+ else if (alice3)
83+ then cooper1
84+ else false)
85+ then true
86+ else if (alice3)
87+ then cooper2
88+ else false
89+ let bobAndCooper = if (if (if (if (if (if (cooper1)
90+ then bob2
91+ else false)
92+ then true
93+ else if (cooper1)
94+ then bob3
95+ else false)
96+ then true
97+ else if (cooper2)
98+ then bob1
99+ else false)
100+ then true
101+ else if (cooper2)
102+ then bob3
103+ else false)
104+ then true
105+ else if (cooper3)
106+ then bob1
107+ else false)
108+ then true
109+ else if (cooper3)
110+ then bob2
111+ else false
112+ match tx {
113+ case _ =>
114+ if (if (aliceAndBob)
115+ then true
116+ else aliceAndCooper)
117+ then true
118+ else bobAndCooper
119+ }
120+ }
121+

github/deemru/w8io/169f3d6 
21.38 ms