tx · AzgL3YdCRyuWMkTvazeViZQg94sbCz9DrArUJsUgUknr

3N4qvMTMYLUVp5BN7SdgpVoKQ91oyJXs5Nr:  -0.01000000 Waves

2020.08.19 12:33 [1139602] smart account 3N4qvMTMYLUVp5BN7SdgpVoKQ91oyJXs5Nr > SELF 0.00000000 Waves

{ "type": 13, "id": "AzgL3YdCRyuWMkTvazeViZQg94sbCz9DrArUJsUgUknr", "fee": 1000000, "feeAssetId": null, "timestamp": 1597829648719, "version": 1, "sender": "3N4qvMTMYLUVp5BN7SdgpVoKQ91oyJXs5Nr", "senderPublicKey": "Gp3fyGLwu9i2GPojWqczK32gDyhTzysv2misVURAhYrS", "proofs": [ "612zHXVCJrKGVaJ1SGrEHn1vRXKsa8d9mYxZ3PXKRh6Ep1tyHyyDfNErGn7ZYVxWCqe1EwNCfN6dELkGMar9jyHS" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAwAAAAAIYWxpY2VQdWIBAAAAIF4+0esly24CmugET9l8o1n3gYY4j99dj1tINWyXoKo0AAAAAAZib2JQdWIBAAAAIOrsn3/4GxfXfqmlltUH8FdvcPm38SoeGHMzOAgHjOgfAAAAAAljYXJ0ZXJQdWIBAAAAIIlo2UW9rkf8gHU+5FEUeofVg0pVY+XnlnVyn6hty/JUAAAAAQAAAAFpAQAAAAhwdXJjaGFzZQAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gdXNlIFdBVkVTIG9ubHkgYXRpIHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAA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gcEAAAAC2FsaWNlQ2FydGVyAwMDAwMDBQAAAAZhbGljZTEFAAAAB2NhcnRlcjIHBgMFAAAABmFsaWNlMQUAAAAHY2FydGVyMwcGAwUAAAAGYWxpY2UyBQAAAAdjYXJ0ZXIxBwYDBQAAAAZhbGljZTIFAAAAB2NhcnRlcjMHBgMFAAAABmFsaWNlMwUAAAAHY2FydGVyMQcGAwUAAAAGYWxpY2UzBQAAAAdjYXJ0ZXIyBwQAAAAHJG1hdGNoMAUAAAACdHgDAwUAAAAIYWxpY2VCb2IGBQAAAAljYXJ0ZXJCb2IGBQAAAAthbGljZUNhcnRlcvGfOS4=", "chainId": 84, "height": 1139602, "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 alicePub = base58'7Ltt9kRCYULU8TdbZ4NqqKqSY61pVSCuSWWWSgyB9Kj9'
5+
6+let bobPub = base58'Gp3fyGLwu9i2GPojWqczK32gDyhTzysv2misVURAhYrS'
7+
8+let carterPub = base58'AFPaqLJAWqT9a4gFALw15ZZNpA9bqDEaYk8CU8ob4WtT'
9+
10+@Callable(i)
11+func purchase () = {
12+ let pmt = extract(i.payment)
13+ if (isDefined(pmt.assetId))
14+ then throw("can use WAVES only ati 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 ((price > pmt.amount))
24+ then throw("purchase amount cannot be less than item price")
25+ else if ((pmt.amount > price))
26+ then throw("purchase amount cannot be higher than item price")
27+ else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
28+ }
29+ }
30+
31+
32+@Verifier(tx)
33+func verify () = {
34+ let alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], alicePub)
35+ let alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], alicePub)
36+ let alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], alicePub)
37+ let bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPub)
38+ let bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPub)
39+ let bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPub)
40+ let carter1 = sigVerify(tx.bodyBytes, tx.proofs[0], carterPub)
41+ let carter2 = sigVerify(tx.bodyBytes, tx.proofs[1], carterPub)
42+ let carter3 = sigVerify(tx.bodyBytes, tx.proofs[2], carterPub)
43+ let aliceBob = 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 carterBob = if (if (if (if (if (if (carter1)
67+ then bob2
68+ else false)
69+ then true
70+ else if (carter1)
71+ then bob3
72+ else false)
73+ then true
74+ else if (carter2)
75+ then bob1
76+ else false)
77+ then true
78+ else if (carter2)
79+ then bob3
80+ else false)
81+ then true
82+ else if (carter3)
83+ then bob1
84+ else false)
85+ then true
86+ else if (carter3)
87+ then bob2
88+ else false
89+ let aliceCarter = if (if (if (if (if (if (alice1)
90+ then carter2
91+ else false)
92+ then true
93+ else if (alice1)
94+ then carter3
95+ else false)
96+ then true
97+ else if (alice2)
98+ then carter1
99+ else false)
100+ then true
101+ else if (alice2)
102+ then carter3
103+ else false)
104+ then true
105+ else if (alice3)
106+ then carter1
107+ else false)
108+ then true
109+ else if (alice3)
110+ then carter2
111+ else false
112+ match tx {
113+ case _ =>
114+ if (if (aliceBob)
115+ then true
116+ else carterBob)
117+ then true
118+ else aliceCarter
119+ }
120+ }
121+

github/deemru/w8io/026f985 
15.04 ms