tx · Dc7EeigLvy9BLcW8wvv4fsfP7YTwvcVSXe89TFDmsMqJ

3MvF7sFhvGrEsFejumj5Ym49EtGFRbGxZiX:  -0.05000000 Waves

2019.09.01 11:38 [656646] smart account 3MvF7sFhvGrEsFejumj5Ym49EtGFRbGxZiX > SELF 0.00000000 Waves

{ "type": 13, "id": "Dc7EeigLvy9BLcW8wvv4fsfP7YTwvcVSXe89TFDmsMqJ", "fee": 5000000, "feeAssetId": null, "timestamp": 1567327089473, "version": 1, "sender": "3MvF7sFhvGrEsFejumj5Ym49EtGFRbGxZiX", "senderPublicKey": "touCRWm8YhWdDf7DhrhJTWKGF3GBunmxUQFhSMwoDKQ", "proofs": [ "2qjhnN6XNFSoPhqsP689guMpWCDsVio6D14XR9Xosh3tbC7qHr9NmGzooQiqGPWt9pq5SzKNahmdgdA7TKyCEFUs", "4aqaQPsnV7jB95USyN5PLEy9psjEFkfZghYH829kwYoJAhxgYBzTPs8WSb3SeNKQaSF2ktgShnvBCWasjVgPpsq", "5UtSNksgZJAtVxxRiZsHcwpSpUkM2K44B9hboTght25kXp6FkVM9QrwN6q8GZdtPa8sAVfT8TxFKn3YJy3bGtHf8" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAAthbGljZVB1YktleQEAAAAgDUWmtTE8KQmFGp6IgXWQWvgLZtPouHDEAptp3nV/LysAAAAACWJvYlB1YktleQEAAAAgyTpG8jWBI79J5nntdURLWaHMTAevOkLo8zPJWvwV7FEAAAAADGNvb3BlclB1YktleQEAAAAgCAe2ckNcZtOX8OnpHq9tv9Su8VOyJVgB0bxPsGtbdlsAAAABAAAAAWkBAAAACHB1cmNoYXNlAAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIGNhbiB1c2UgV0FWRVMgb25seSBhdCB0aGUgbW9tZW50BAAAAA9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uZENvb3BlcgMDAwMDAwUAAAAGYWxpY2UxBQAAAAdjb29wZXIyBwYDBQAAAAZhbGljZTEFAAAAB2Nvb3BlcjMHBgMFAAAABmFsaWNlMgUAAAAHY29vcGVyMQcGAwUAAAAGYWxpY2UyBQAAAAdjb29wZXIzBwYDBQAAAAZhbGljZTMFAAAAB2Nvb3BlcjEHBgMFAAAABmFsaWNlMwUAAAAHY29vcGVyMgcEAAAADGJvYkFuZENvb3BlcgMDAwMDAwUAAAAEYm9iMQUAAAAHY29vcGVyMgcGAwUAAAAEYm9iMQUAAAAHY29vcGVyMwcGAwUAAAAEYm9iMgUAAAAHY29vcGVyMQcGAwUAAAAEYm9iMgUAAAAHY29vcGVyMwcGAwUAAAAEYm9iMwUAAAAHY29vcGVyMQcGAwUAAAAEYm9iMwUAAAAHY29vcGVyMgcEAAAAByRtYXRjaDAFAAAAAnR4AwMFAAAAC2FsaWNlQW5kQm9iBgUAAAAOYWxpY2VBbmRDb29wZXIGBQAAAAxib2JBbmRDb29wZXJgikLh", "chainId": 84, "height": 656646, "spentComplexity": 0 } View: original | compacted Prev: 2hxsB3UP9JfRAxqYAjbk9KnL4inD5SWvCjh765j4mUFe Next: EgBqoAhyNKNJmvCYZuMht87rdKD4tpKTgwniEAN6sXVk Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let alicePubKey = base58'touCRWm8YhWdDf7DhrhJTWKGF3GBunmxUQFhSMwoDKQ'
55
66 let bobPubKey = base58'EYWVJ6rgHwAz6uh7u4eX2STJbNGQPyKhxndwYNhn8k3i'
77
88 let cooperPubKey = base58'YM5oFwT9L8f2rwVnqSHU3BpfT7r5jTLkq7pC9UYipY2'
99
1010 @Callable(i)
1111 func purchase () = {
1212 let pmt = extract(i.payment)
1313 if (isDefined(pmt.assetId))
1414 then throw("can use WAVES only at the moment")
1515 else {
1616 let customerAddress = toBase58String(i.caller.bytes)
1717 let price = match getInteger(this, "item_A_coupon_price") {
1818 case a: Int =>
1919 a
2020 case _ =>
2121 0
2222 }
2323 if ((price > pmt.amount))
2424 then throw("purchase amount cannot be less than item price")
2525 else if ((pmt.amount > price))
2626 then throw("purchase amount cannot be higher than item price")
2727 else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
2828 }
2929 }
3030
3131
3232 @Verifier(tx)
3333 func verify () = {
3434 let alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey)
3535 let alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], alicePubKey)
3636 let alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], alicePubKey)
3737 let bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPubKey)
3838 let bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey)
3939 let bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPubKey)
4040 let cooper1 = sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey)
4141 let cooper2 = sigVerify(tx.bodyBytes, tx.proofs[1], cooperPubKey)
4242 let cooper3 = sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubKey)
4343 let aliceAndBob = if (if (if (if (if (if (alice1)
4444 then bob2
4545 else false)
4646 then true
4747 else if (alice1)
4848 then bob3
4949 else false)
5050 then true
5151 else if (alice2)
5252 then bob1
5353 else false)
5454 then true
5555 else if (alice2)
5656 then bob3
5757 else false)
5858 then true
5959 else if (alice3)
6060 then bob1
6161 else false)
6262 then true
6363 else if (alice3)
6464 then bob2
6565 else false
6666 let aliceAndCooper = if (if (if (if (if (if (alice1)
6767 then cooper2
6868 else false)
6969 then true
7070 else if (alice1)
7171 then cooper3
7272 else false)
7373 then true
7474 else if (alice2)
7575 then cooper1
7676 else false)
7777 then true
7878 else if (alice2)
7979 then cooper3
8080 else false)
8181 then true
8282 else if (alice3)
8383 then cooper1
8484 else false)
8585 then true
8686 else if (alice3)
8787 then cooper2
8888 else false
8989 let bobAndCooper = if (if (if (if (if (if (bob1)
9090 then cooper2
9191 else false)
9292 then true
9393 else if (bob1)
9494 then cooper3
9595 else false)
9696 then true
9797 else if (bob2)
9898 then cooper1
9999 else false)
100100 then true
101101 else if (bob2)
102102 then cooper3
103103 else false)
104104 then true
105105 else if (bob3)
106106 then cooper1
107107 else false)
108108 then true
109109 else if (bob3)
110110 then cooper2
111111 else false
112112 match tx {
113113 case _ =>
114114 if (if (aliceAndBob)
115115 then true
116116 else aliceAndCooper)
117117 then true
118118 else bobAndCooper
119119 }
120120 }
121121

github/deemru/w8io/026f985 
34.71 ms