tx · FS9KikawnPGb4qgmLVU92WKpYjpYqm6nJNkuv3BG3EZL

3MzVXk2cYsNaLfTxtBDYVGk2vaWoxALVQYF:  -0.04000000 Waves

2019.10.10 03:17 [713028] smart account 3MzVXk2cYsNaLfTxtBDYVGk2vaWoxALVQYF > SELF 0.00000000 Waves

{ "type": 13, "id": "FS9KikawnPGb4qgmLVU92WKpYjpYqm6nJNkuv3BG3EZL", "fee": 4000000, "feeAssetId": null, "timestamp": 1570666003675, "version": 1, "sender": "3MzVXk2cYsNaLfTxtBDYVGk2vaWoxALVQYF", "senderPublicKey": "9B4neTu1Wt3FKP3H1XE5i99creaB5vZ2VeJineSJEAt5", "proofs": [ "2N4Z9eBh1Uf9nW8SgjBD5825FdtmmermDg13brr2qvySoNnTiafjSgqn3Kq1LiMLyR6utWM1RMaorsAa9L9nR5KF", "4fKwwhgiag2Y4Lnp2gHdRrZxHwSgaW8eF4fkS5fTCndCFWHGqKpvCpDNKEm4EuC759Znjdaytgog6xU2UUxpjS4z", "3StcgDdYAo2oTHRnGs3GMZcWnYtjBLbiaHRyDxyVkyW2r43jNybzUhqbGSwPUyy3riLbzqYGJLAhShHb9gzs8uxi" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAgY2FuIHVzZSBXQVZFUyBvbmx5IGF0IHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5wdXJjaGFzZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbiBpdGVtIHByaWNlAwkAAGYAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UJAAACAAAAAQIAAAAwcHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBoaWdoZXIgdGhhbiBpdGVtIHByaWNlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAIHN0YXR1czpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAB9wcmljZTpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkZHJlc3MFAAAABXByaWNlBQAAAANuaWwAAAABAAAAAnR4AQAAABBzdGFuZGFyZFZlcmlmaWVyAAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAICAUAAAACdHgAAAAGc2VuZGVyAAAABWJ5dGVzIW8J5w==", "chainId": 84, "height": 713028, "spentComplexity": 0 } View: original | compacted Prev: GHnhNbfD84LRqPkjuyY69QKziYEsyu7bdJTEkpt7BBU8 Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let alicePubKey = base58'3cwC3QGDvTuJ4fiJGtkSZUkUDLMMHADsNjee31nn31TK'
54
6-let bobPubKey = base58'34vRSDmbyQ1P5B2KJKRW5snyxaXD7qNUqJ9b7a5HmwTu'
7-
8-let cooperPubKey = base58'9B4neTu1Wt3FKP3H1XE5i99creaB5vZ2VeJineSJEAt5'
95
106 @Callable(i)
117 func purchase () = {
3026
3127
3228 @Verifier(tx)
33-func verify () = {
34- let alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey)
35- let alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], alicePubKey)
36- let alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], alicePubKey)
37- let bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPubKey)
38- let bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey)
39- let bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPubKey)
40- let cooper1 = sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey)
41- let cooper2 = sigVerify(tx.bodyBytes, tx.proofs[1], cooperPubKey)
42- let cooper3 = sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubKey)
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 bobeAndCooper = if (if (if (if (if (if (bob1)
90- then cooper2
91- else false)
92- then true
93- else if (bob2)
94- then cooper3
95- else false)
96- then true
97- else if (bob2)
98- then cooper1
99- else false)
100- then true
101- else if (bob2)
102- then cooper3
103- else false)
104- then true
105- else if (bob3)
106- then cooper1
107- else false)
108- then true
109- else if (bob3)
110- then cooper2
111- else false
112- match tx {
113- case _ =>
114- if (if (aliceAndBob)
115- then true
116- else aliceAndCooper)
117- then true
118- else bobeAndCooper
119- }
120- }
29+func standardVerifier () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.sender.bytes)
12130
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let alicePubKey = base58'3cwC3QGDvTuJ4fiJGtkSZUkUDLMMHADsNjee31nn31TK'
54
6-let bobPubKey = base58'34vRSDmbyQ1P5B2KJKRW5snyxaXD7qNUqJ9b7a5HmwTu'
7-
8-let cooperPubKey = base58'9B4neTu1Wt3FKP3H1XE5i99creaB5vZ2VeJineSJEAt5'
95
106 @Callable(i)
117 func purchase () = {
128 let pmt = extract(i.payment)
139 if (isDefined(pmt.assetId))
1410 then throw("can use WAVES only at the moment")
1511 else {
1612 let customerAddress = toBase58String(i.caller.bytes)
1713 let price = match getInteger(this, "item_A_coupon_price") {
1814 case a: Int =>
1915 a
2016 case _ =>
2117 0
2218 }
2319 if ((price > pmt.amount))
2420 then throw("purchase amount cannot be less than item price")
2521 else if ((pmt.amount > price))
2622 then throw("purchase amount cannot be higher than item price")
2723 else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
2824 }
2925 }
3026
3127
3228 @Verifier(tx)
33-func verify () = {
34- let alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey)
35- let alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], alicePubKey)
36- let alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], alicePubKey)
37- let bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPubKey)
38- let bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey)
39- let bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPubKey)
40- let cooper1 = sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey)
41- let cooper2 = sigVerify(tx.bodyBytes, tx.proofs[1], cooperPubKey)
42- let cooper3 = sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubKey)
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 bobeAndCooper = if (if (if (if (if (if (bob1)
90- then cooper2
91- else false)
92- then true
93- else if (bob2)
94- then cooper3
95- else false)
96- then true
97- else if (bob2)
98- then cooper1
99- else false)
100- then true
101- else if (bob2)
102- then cooper3
103- else false)
104- then true
105- else if (bob3)
106- then cooper1
107- else false)
108- then true
109- else if (bob3)
110- then cooper2
111- else false
112- match tx {
113- case _ =>
114- if (if (aliceAndBob)
115- then true
116- else aliceAndCooper)
117- then true
118- else bobeAndCooper
119- }
120- }
29+func standardVerifier () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.sender.bytes)
12130

github/deemru/w8io/169f3d6 
39.31 ms