tx · BU9GXXcaaYGgXHsLbVRQuJyTZLdZDgvQrPiH8uh4E3Fh

3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b:  -0.01400000 Waves

2019.08.17 19:05 [635336] smart account 3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b > SELF 0.00000000 Waves

{ "type": 13, "id": "BU9GXXcaaYGgXHsLbVRQuJyTZLdZDgvQrPiH8uh4E3Fh", "fee": 1400000, "feeAssetId": null, "timestamp": 1566057905912, "version": 1, "sender": "3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b", "senderPublicKey": "848RkjzRcJfyWuhGbq8NUFoLMpeDW8NbKu36H3SouHzF", "proofs": [ "e3wfgJy8Ehh87MPmPuz4zyFTBWRLSKcq27TXGC4C9LLy39fKKXRZyPXyd2wg3QC1f28E9AX78t5wfnTXX9xyKi2" ], "script": "base64:AAIDAAAAAAAAAAAAAAAGAAAAAAhvd25lcktleQIAAAAFb3duZXIAAAAACndhdmVzVG9rZW4FAAAABHVuaXQBAAAACXBheW1lbnRPZgAAAAEAAAADa2V5CQABLAAAAAICAAAAC3BheW1lbnRfb2ZfBQAAAANrZXkBAAAACHN0YXR1c09mAAAAAQAAAANrZXkJAAEsAAAAAgIAAAAKc3RhdHVzX29mXwUAAAADa2V5AAAAAAVvd25lcgkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABCQEAAAAFdmFsdWUAAAABCQAEHQAAAAIFAAAABHRoaXMFAAAACG93bmVyS2V5AQAAABBpc1BheW1lbnRQZW5kaW5nAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkBAAAACHN0YXR1c09mAAAAAQUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAXMFAAAAByRtYXRjaDAJAAAAAAAAAgUAAAABcwIAAAAHcGVuZGluZwcAAAAEAAAAAWkBAAAABGluaXQAAAACAAAABW93bmVyAAA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WwJAAACAAAAAQkAASwAAAACAgAAABhjYW4gb25seSBXQVZFUywgYnV0IGdvdCAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAAWEAAAAHYXNzZXRJZAkAAAIAAAABAgAAACdwYXltZW50IGluIGFzc2V0VG9rZW5zIG11c3QgYmUgYXR0YWNoZWQAAAABaQEAAAAGcmVqZWN0AAAAAQAAAANrZXkDCQEAAAAQaXNQYXltZW50UGVuZGluZwAAAAEFAAAAA2tleQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAACHN0YXR1c09mAAAAAQUAAAADa2V5AgAAAAhyZWplY3RlZAUAAAADbmlsCQAAAgAAAAECAAAAKE9yZGVyIGFscmVhZHkgaGFzIGJlZW4gcGF5ZWQgb3IgcmVqZWN0ZWQAAAAAKOWzgQ==", "chainId": 84, "height": 635336, "spentComplexity": 0 } View: original | compacted Prev: CHewGNZ7JCerPu7hM8DY4Y35WUCdMU72wUEBfZCPUwLn Next: 4eBu2boFdduc9ZT99y4hwaEBtMBeQ9pCpzvQTPrBwsgh Diff:
OldNewDifferences
3434
3535
3636 @Callable(i)
37-func pay (key) = if (isPaymentPending(key))
38- then match i.payment {
39- case a: AttachedPayment =>
40- if ((a.assetId == wavesToken))
41- then {
42- let datas = WriteSet([DataEntry(statusOf(key), "paid")])
43- let payment = getIntegerValue(this, paymentOf(key))
44- ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
45- }
46- else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
47- case _ =>
48- throw("payment in assetTokens must be attached")
49- }
50- else throw("Order already has been payed or rejected")
37+func pay (key) = match i.payment {
38+ case a: AttachedPayment =>
39+ if ((a.assetId == wavesToken))
40+ then {
41+ let datas = WriteSet([DataEntry(statusOf(key), "paid")])
42+ let payment = getIntegerValue(this, paymentOf(key))
43+ ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
44+ }
45+ else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
46+ case _ =>
47+ throw("payment in assetTokens must be attached")
48+}
5149
5250
5351
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ownerKey = "owner"
55
66 let wavesToken = unit
77
88 func paymentOf (key) = ("payment_of_" + key)
99
1010
1111 func statusOf (key) = ("status_of_" + key)
1212
1313
1414 let owner = addressFromStringValue(value(getString(this, ownerKey)))
1515
1616 func isPaymentPending (key) = match getString(this, statusOf(key)) {
1717 case s: String =>
1818 (s == "pending")
1919 case _ =>
2020 false
2121 }
2222
2323
2424 @Callable(i)
2525 func init (owner,token) = if ((i.caller == this))
2626 then WriteSet([DataEntry(ownerKey, owner)])
2727 else throw("only dapp itself can init")
2828
2929
3030
3131 @Callable(i)
3232 func setWaitToPayment (key,payment) = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment)])
3333
3434
3535
3636 @Callable(i)
37-func pay (key) = if (isPaymentPending(key))
38- then match i.payment {
39- case a: AttachedPayment =>
40- if ((a.assetId == wavesToken))
41- then {
42- let datas = WriteSet([DataEntry(statusOf(key), "paid")])
43- let payment = getIntegerValue(this, paymentOf(key))
44- ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
45- }
46- else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
47- case _ =>
48- throw("payment in assetTokens must be attached")
49- }
50- else throw("Order already has been payed or rejected")
37+func pay (key) = match i.payment {
38+ case a: AttachedPayment =>
39+ if ((a.assetId == wavesToken))
40+ then {
41+ let datas = WriteSet([DataEntry(statusOf(key), "paid")])
42+ let payment = getIntegerValue(this, paymentOf(key))
43+ ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
44+ }
45+ else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
46+ case _ =>
47+ throw("payment in assetTokens must be attached")
48+}
5149
5250
5351
5452 @Callable(i)
5553 func reject (key) = if (isPaymentPending(key))
5654 then WriteSet([DataEntry(statusOf(key), "rejected")])
5755 else throw("Order already has been payed or rejected")
5856
5957

github/deemru/w8io/026f985 
28.90 ms