tx · Bvt76C2Lj58xmFDmcHWhwE1jiSJcSDkMTQxvSCTA4Mia

3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b:  -0.01400000 Waves

2019.08.17 18:40 [635304] smart account 3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b > SELF 0.00000000 Waves

{ "type": 13, "id": "Bvt76C2Lj58xmFDmcHWhwE1jiSJcSDkMTQxvSCTA4Mia", "fee": 1400000, "feeAssetId": null, "timestamp": 1566056388620, "version": 1, "sender": "3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b", "senderPublicKey": "848RkjzRcJfyWuhGbq8NUFoLMpeDW8NbKu36H3SouHzF", "proofs": [ "2kEap5L6D8NGfCS7ewdShxrpYSEY1Akoeq1AZQJFzpuYFQR7J8L1NoUVWNMuptRsBTWzPM4PkRMRk2cNEwHPd7Mc" ], "script": "base64:AAIDAAAAAAAAAAAAAAAGAAAAAAhvd25lcktleQIAAAAFb3duZXIAAAAACndhdmVzVG9rZW4FAAAABHVuaXQBAAAACXBheW1lbnRPZgAAAAEAAAADa2V5CQABLAAAAAICAAAAC3BheW1lbnRfb2ZfBQAAAANrZXkBAAAACHN0YXR1c09mAAAAAQAAAANrZXkJAAEsAAAAAgIAAAAKc3RhdHVzX29mXwUAAAADa2V5AAAAAAVvd25lcgkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABCQEAAAAFdmFsdWUAAAABCQAEHQAAAAIFAAAABHRoaXMFAAAACG93bmVyS2V5AQAAABBpc1BheW1lbnRQZW5kaW5nAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkBAAAACHN0YXR1c09mAAAAAQUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAXMFAAAAByRtYXRjaDAJAAAAAAAAAgUAAAABcwIAAAAHcGVuZGluZwcAAAAEAAAAAWkBAAAABGluaXQAAAACAAAABW93bmVyAA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hdGFzCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAABW93bmVyBQAAAAdwYXltZW50BQAAAAp3YXZlc1Rva2VuBQAAAANuaWwJAAACAAAAAQkAASwAAAACAgAAABhjYW4gb25seSBXQVZFUywgYnV0IGdvdCAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAAWEAAAAHYXNzZXRJZAkAAAIAAAABAgAAACdwYXltZW50IGluIGFzc2V0VG9rZW5zIG11c3QgYmUgYXR0YWNoZWQAAAABaQEAAAAGcmVqZWN0AAAAAQAAAANrZXkDCQEAAAABIQAAAAEJAQAAABBpc1BheW1lbnRQZW5kaW5nAAAAAQUAAAADa2V5CQAAAgAAAAECAAAAKE9yZGVyIGFscmVhZHkgaGFzIGJlZW4gcGF5ZWQgb3IgcmVqZWN0ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAAhzdGF0dXNPZgAAAAEFAAAAA2tleQAAAAAAAAAAAAUAAAADbmlsAAAAAKSrp2A=", "chainId": 84, "height": 635304, "spentComplexity": 0 } View: original | compacted Prev: CJZNqi4KppWUpUs8bVmW1qBrGKRcKHVjwNYNdXyxcGbw Next: EWEKbcyBjR9JBiJ4JBfqQyC4NKA4HL6wFJzQ9Va9zCdY Diff:
OldNewDifferences
2929
3030
3131 @Callable(i)
32-func setWaitToPayment (key,payment) = {
33- let data = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment)])
34- ScriptResult(data, TransferSet([ScriptTransfer(owner, 0, wavesToken)]))
35- }
32+func setWaitToPayment (key,payment) = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment)])
3633
3734
3835
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)
32-func setWaitToPayment (key,payment) = {
33- let data = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment)])
34- ScriptResult(data, TransferSet([ScriptTransfer(owner, 0, wavesToken)]))
35- }
32+func setWaitToPayment (key,payment) = WriteSet([DataEntry(statusOf(key), "pending"), DataEntry(paymentOf(key), payment)])
3633
3734
3835
3936 @Callable(i)
4037 func pay (key) = if (!(isPaymentPending(key)))
4138 then throw("Order already has been payed or rejected")
4239 else match i.payment {
4340 case a: AttachedPayment =>
4441 if ((a.assetId == wavesToken))
4542 then {
4643 let datas = WriteSet([DataEntry(statusOf(key), "pending")])
4744 let payment = getIntegerValue(this, paymentOf(key))
4845 ScriptResult(datas, TransferSet([ScriptTransfer(owner, payment, wavesToken)]))
4946 }
5047 else throw(("can only WAVES, but got " + toBase58String(value(a.assetId))))
5148 case _ =>
5249 throw("payment in assetTokens must be attached")
5350 }
5451
5552
5653
5754 @Callable(i)
5855 func reject (key) = if (!(isPaymentPending(key)))
5956 then throw("Order already has been payed or rejected")
6057 else WriteSet([DataEntry(statusOf(key), 0)])
6158
6259

github/deemru/w8io/169f3d6 
82.89 ms