tx · YzUa1XsTrv1uTjeBJa3SCHfA394pEuhvJPrkfybqyfQ

3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b:  -0.01400000 Waves

2019.08.20 01:00 [638617] smart account 3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b > SELF 0.00000000 Waves

{ "type": 13, "id": "YzUa1XsTrv1uTjeBJa3SCHfA394pEuhvJPrkfybqyfQ", "fee": 1400000, "feeAssetId": null, "timestamp": 1566251992750, "version": 1, "sender": "3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b", "senderPublicKey": "848RkjzRcJfyWuhGbq8NUFoLMpeDW8NbKu36H3SouHzF", "proofs": [ "Y53mfmbKshR6r8omzoBoomswSYZzxxd432dSB3GSawwi9KouRzT1P6DgqJMbtnbNpZyLxLggoXnNU2jEwMoSv8x" ], "script": "base64:AAIDAAAAAAAAAAAAAAAJAAAAAAp3YXZlc1Rva2VuBQAAAAR1bml0AQAAAAlwYXltZW50T2YAAAABAAAAA2tleQkAASwAAAACAgAAAAtwYXltZW50X29mXwUAAAADa2V5AQAAAAtyZWNpcGllbnRPZgAAAAEAAAADa2V5CQABLAAAAAICAAAADXJlY2lwaWVudF9vZl8FAAAAA2tleQEAAAANbWVzc2FnZUZyb21PZgAAAAEAAAADa2V5CQABLAAAAAICAAAAEG1lc3NhZ2VfZnJvbV9vZl8FAAAAA2tleQEAAAAMbWVzc2FnZUZvck9mAAAAAQAAAANrZXkJAAEsAAAAAgIAAAAPbWVzc2FnZV9mb3Jfb2ZfBQAAAANrZXkBAAAACHN0YXR1c09mAAAAAQAAAANrZXkJAAEsAAAAAgIAAAAKc3RhdHVzX29mXwUAAAADa2V5AAAAAAVvd25lcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVODzoHGaptefRUJh0KW8JHEuHZK8qB2jXAEAAAAQaXNQYXltZW50UGVuZGluZwAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAQAAAAhzdGF0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TLCBidXQgZ290IAkAAlgAAAABCQEAAAAFdmFsdWUAAAABCAUAAAABYQAAAAdhc3NldElkCQAAAgAAAAECAAAAJ3BheW1lbnQgaW4gYXNzZXRUb2tlbnMgbXVzdCBiZSBhdHRhY2hlZAkAAAIAAAABAgAAAChPcmRlciBhbHJlYWR5IGhhcyBiZWVuIHBheWVkIG9yIHJlamVjdGVkAAAAAWkBAAAABnJlamVjdAAAAAIAAAADa2V5AAAAB21lc3NhZ2UDCQEAAAAQaXNQYXltZW50UGVuZGluZwAAAAEFAAAAA2tleQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAACHN0YXR1c09mAAAAAQUAAAADa2V5AgAAAAhyZWplY3RlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADG1lc3NhZ2VGb3JPZgAAAAEFAAAAA2tleQUAAAAHbWVzc2FnZQUAAAADbmlsCQAAAgAAAAECAAAAKE9yZGVyIGFscmVhZHkgaGFzIGJlZW4gcGF5ZWQgb3IgcmVqZWN0ZWQAAAABaQEAAAAIdHJhbnNmZXIAAAABAAAACmFkZHJlc3NTdHIJAQAAAApkb1RyYW5zZmVyAAAAAggFAAAAAWkAAAAHcGF5bWVudAUAAAAKYWRkcmVzc1N0cgAAAADHWZr1", "chainId": 84, "height": 638617, "spentComplexity": 0 } View: original | compacted Prev: 97jvZ2KG5rthzD4w6oKonTTm75CFscADpgyvmK72as3f Next: none Diff:
OldNewDifferences
44 let wavesToken = unit
55
66 func paymentOf (key) = ("payment_of_" + key)
7+
8+
9+func recipientOf (key) = ("recipient_of_" + key)
10+
11+
12+func messageFromOf (key) = ("message_from_of_" + key)
13+
14+
15+func messageForOf (key) = ("message_for_of_" + key)
716
817
918 func statusOf (key) = ("status_of_" + key)
1928 }
2029
2130
22-@Callable(i)
23-func setWaitToPayment (key,payment) = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment)])
24-
25-
26-
27-@Callable(i)
28-func pay (key) = if (isPaymentPending(key))
29- then match i.payment {
30- case a: AttachedPayment =>
31- if ((a.assetId == wavesToken))
32- then {
33- let datas = WriteSet([DataEntry(statusOf(key), "paid")])
34- let payment = extract(getInteger(this, paymentOf(key)))
35- ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
36- }
37- else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
38- case _ =>
39- throw("payment in assetTokens must be attached")
40- }
41- else throw("Order already has been payed or rejected")
42-
43-
44-
45-@Callable(i)
46-func reject (key) = if (isPaymentPending(key))
47- then WriteSet([DataEntry(statusOf(key), "rejected")])
48- else throw("Order already has been payed or rejected")
49-
50-
51-
52-@Callable(i)
53-func transfer (addressStr) = match i.payment {
31+func doTransfer (payment,addressStr) = match payment {
5432 case a: AttachedPayment =>
5533 if ((a.assetId == wavesToken))
5634 then match addressFromString(addressStr) {
6543 }
6644
6745
46+@Callable(i)
47+func setWaitToPayment (key,payment,recipient,message) = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment), DataEntry(recipientOf(key), recipient), DataEntry(messageFromOf(key), message)])
48+
49+
50+
51+@Callable(i)
52+func pay (key,message) = if (isPaymentPending(key))
53+ then match i.payment {
54+ case a: AttachedPayment =>
55+ if ((a.assetId == wavesToken))
56+ then {
57+ let datas = WriteSet([DataEntry(statusOf(key), "paid"), DataEntry(messageForOf(key), message)])
58+ let payment = extract(getInteger(this, paymentOf(key)))
59+ ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
60+ }
61+ else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
62+ case _ =>
63+ throw("payment in assetTokens must be attached")
64+ }
65+ else throw("Order already has been payed or rejected")
66+
67+
68+
69+@Callable(i)
70+func reject (key,message) = if (isPaymentPending(key))
71+ then WriteSet([DataEntry(statusOf(key), "rejected"), DataEntry(messageForOf(key), message)])
72+ else throw("Order already has been payed or rejected")
73+
74+
75+
76+@Callable(i)
77+func transfer (addressStr) = doTransfer(i.payment, addressStr)
78+
79+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let wavesToken = unit
55
66 func paymentOf (key) = ("payment_of_" + key)
7+
8+
9+func recipientOf (key) = ("recipient_of_" + key)
10+
11+
12+func messageFromOf (key) = ("message_from_of_" + key)
13+
14+
15+func messageForOf (key) = ("message_for_of_" + key)
716
817
918 func statusOf (key) = ("status_of_" + key)
1019
1120
1221 let owner = Address(base58'3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b')
1322
1423 func isPaymentPending (key) = match getString(this, statusOf(key)) {
1524 case s: String =>
1625 (s == "pending")
1726 case _ =>
1827 false
1928 }
2029
2130
22-@Callable(i)
23-func setWaitToPayment (key,payment) = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment)])
24-
25-
26-
27-@Callable(i)
28-func pay (key) = if (isPaymentPending(key))
29- then match i.payment {
30- case a: AttachedPayment =>
31- if ((a.assetId == wavesToken))
32- then {
33- let datas = WriteSet([DataEntry(statusOf(key), "paid")])
34- let payment = extract(getInteger(this, paymentOf(key)))
35- ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
36- }
37- else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
38- case _ =>
39- throw("payment in assetTokens must be attached")
40- }
41- else throw("Order already has been payed or rejected")
42-
43-
44-
45-@Callable(i)
46-func reject (key) = if (isPaymentPending(key))
47- then WriteSet([DataEntry(statusOf(key), "rejected")])
48- else throw("Order already has been payed or rejected")
49-
50-
51-
52-@Callable(i)
53-func transfer (addressStr) = match i.payment {
31+func doTransfer (payment,addressStr) = match payment {
5432 case a: AttachedPayment =>
5533 if ((a.assetId == wavesToken))
5634 then match addressFromString(addressStr) {
5735 case address: Address =>
5836 TransferSet([ScriptTransfer(address, a.amount, wavesToken)])
5937 case _ =>
6038 throw("invalin address")
6139 }
6240 else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
6341 case _ =>
6442 throw("payment in assetTokens must be attached")
6543 }
6644
6745
46+@Callable(i)
47+func setWaitToPayment (key,payment,recipient,message) = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment), DataEntry(recipientOf(key), recipient), DataEntry(messageFromOf(key), message)])
48+
49+
50+
51+@Callable(i)
52+func pay (key,message) = if (isPaymentPending(key))
53+ then match i.payment {
54+ case a: AttachedPayment =>
55+ if ((a.assetId == wavesToken))
56+ then {
57+ let datas = WriteSet([DataEntry(statusOf(key), "paid"), DataEntry(messageForOf(key), message)])
58+ let payment = extract(getInteger(this, paymentOf(key)))
59+ ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
60+ }
61+ else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
62+ case _ =>
63+ throw("payment in assetTokens must be attached")
64+ }
65+ else throw("Order already has been payed or rejected")
66+
67+
68+
69+@Callable(i)
70+func reject (key,message) = if (isPaymentPending(key))
71+ then WriteSet([DataEntry(statusOf(key), "rejected"), DataEntry(messageForOf(key), message)])
72+ else throw("Order already has been payed or rejected")
73+
74+
75+
76+@Callable(i)
77+func transfer (addressStr) = doTransfer(i.payment, addressStr)
78+
79+

github/deemru/w8io/026f985 
26.55 ms