tx · t3D15JsUrDF3KM6M8h7VkgdTXPDpdkQjMkqXSLGRfJf

3MvFWdf5NgnMVSprWTkEP1okPo1pDgqLH76:  -0.01400000 Waves

2020.10.02 13:03 [1202784] smart account 3MvFWdf5NgnMVSprWTkEP1okPo1pDgqLH76 > SELF 0.00000000 Waves

{ "type": 13, "id": "t3D15JsUrDF3KM6M8h7VkgdTXPDpdkQjMkqXSLGRfJf", "fee": 1400000, "feeAssetId": null, "timestamp": 1601633005952, "version": 2, "chainId": 84, "sender": "3MvFWdf5NgnMVSprWTkEP1okPo1pDgqLH76", "senderPublicKey": "7qQJSjnWatmsj6R3ztxN7Z8dnfhozBHpLwKYKgpSKWMd", "proofs": [ "2khFA98zGGLHcUmLxWxUM8Z2zgfbxvnzA8TFmh4GEmwsjF76xTaobro6eyMPid7QUFA4dVQJgHnEJWeqYCTrNTqj", "5knGeMLbgA4DDTLPw9bPWy3Hxhgu3CwZ6KYwDwtkK3Phat32N6n12Wbj5CgubiCszVS74dt2WDTNLyoTATgJUMGk" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAwAAAAALYWxpY2VQdWJLZXkBAAAAIGWMWL1xS8UM0sunKVizh4wfr9liEBCLf8kf/FHCLjtAAAAAAAlib2JQdWJLZXkBAAAAIFWhIQjZ0p7zX1Aax7DUrjRyF/IFaG7tPly3lj9wpgMYAAAAAAxjb29wZXJQdWJLZXkBAAAAIH6pV/Zr5KzU7mhyJG84bHzs5/S+RkxIN29Q/qRoYgpmAAAAAQAAAAFpAQAAAAhwdXJjaGFzZQAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACBjYW4gdXNlIFdBVkVTIG9ubHkgYXQgdGhlIG1vbWVudAQAAAAPY3VzdG9tZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAA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HY29vcGVyMgcGAwUAAAAGYWxpY2UxBQAAAAdjb29wZXIzBwYDBQAAAAZhbGljZTIFAAAAB2Nvb3BlcjEHBgMFAAAABmFsaWNlMgUAAAAHY29vcGVyMwcGAwUAAAAGYWxpY2UzBQAAAAdjb29wZXIxBwYDBQAAAAZhbGljZTMFAAAAB2Nvb3BlcjIHBAAAAAxib2JBbmRDb29wZXIDAwMDAwMFAAAAB2Nvb3BlcjEFAAAABGJvYjIHBgMFAAAAB2Nvb3BlcjEFAAAABGJvYjMHBgMFAAAAB2Nvb3BlcjIFAAAABGJvYjEHBgMFAAAAB2Nvb3BlcjIFAAAABGJvYjMHBgMFAAAAB2Nvb3BlcjMFAAAABGJvYjEHBgMFAAAAB2Nvb3BlcjMFAAAABGJvYjIHBAAAAAckbWF0Y2gwBQAAAAJ0eAMDBQAAAAthbGljZUFuZEJvYgYFAAAADmFsaWNlQW5kQ29vcGVyBgUAAAAMYm9iQW5kQ29vcGVyB+i6Lw==", "height": 1202784, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3T6LRUadpf5YnqUk5heWCGeewaQQBVj4mqQZ38wSvqb6 Next: 9ojzsroAi3MUvS9cTpiv339ATH3gzfxVrYBtkog5QZMi Diff:
OldNewDifferences
66 let bobPubKey = base58'6mGA9LY4CmJFmQjCd2owynzAriXsRbtGrV7nKoimiuLs'
77
88 let cooperPubKey = base58'9XS9277UP5uChd1k1JU2T3mgZzvAooJf8yciGGrqGWK7'
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 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 ((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+ }
930
1031
1132 @Verifier(tx)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let alicePubKey = base58'7qQJSjnWatmsj6R3ztxN7Z8dnfhozBHpLwKYKgpSKWMd'
55
66 let bobPubKey = base58'6mGA9LY4CmJFmQjCd2owynzAriXsRbtGrV7nKoimiuLs'
77
88 let cooperPubKey = base58'9XS9277UP5uChd1k1JU2T3mgZzvAooJf8yciGGrqGWK7'
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 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 ((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+ }
930
1031
1132 @Verifier(tx)
1233 func verify () = {
1334 let alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey)
1435 let alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], alicePubKey)
1536 let alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], alicePubKey)
1637 let bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPubKey)
1738 let bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey)
1839 let bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPubKey)
1940 let cooper1 = sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey)
2041 let cooper2 = sigVerify(tx.bodyBytes, tx.proofs[1], cooperPubKey)
2142 let cooper3 = sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubKey)
2243 let aliceAndBob = if (if (if (if (if (if (alice1)
2344 then bob2
2445 else false)
2546 then true
2647 else if (alice1)
2748 then bob3
2849 else false)
2950 then true
3051 else if (alice2)
3152 then bob1
3253 else false)
3354 then true
3455 else if (alice2)
3556 then bob3
3657 else false)
3758 then true
3859 else if (alice3)
3960 then bob1
4061 else false)
4162 then true
4263 else if (alice3)
4364 then bob2
4465 else false
4566 let aliceAndCooper = if (if (if (if (if (if (alice1)
4667 then cooper2
4768 else false)
4869 then true
4970 else if (alice1)
5071 then cooper3
5172 else false)
5273 then true
5374 else if (alice2)
5475 then cooper1
5576 else false)
5677 then true
5778 else if (alice2)
5879 then cooper3
5980 else false)
6081 then true
6182 else if (alice3)
6283 then cooper1
6384 else false)
6485 then true
6586 else if (alice3)
6687 then cooper2
6788 else false
6889 let bobAndCooper = if (if (if (if (if (if (cooper1)
6990 then bob2
7091 else false)
7192 then true
7293 else if (cooper1)
7394 then bob3
7495 else false)
7596 then true
7697 else if (cooper2)
7798 then bob1
7899 else false)
79100 then true
80101 else if (cooper2)
81102 then bob3
82103 else false)
83104 then true
84105 else if (cooper3)
85106 then bob1
86107 else false)
87108 then true
88109 else if (cooper3)
89110 then bob2
90111 else false
91112 match tx {
92113 case _ =>
93114 if (if (aliceAndBob)
94115 then true
95116 else aliceAndCooper)
96117 then true
97118 else bobAndCooper
98119 }
99120 }
100121

github/deemru/w8io/026f985 
38.34 ms