tx · DuX8EgpzV1G3sXRn1b6eJe21NWVb6TQjr4uWYTv8ZfoL

3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni:  -0.01400000 Waves

2019.08.19 13:57 [637942] smart account 3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni > SELF 0.00000000 Waves

{ "type": 13, "id": "DuX8EgpzV1G3sXRn1b6eJe21NWVb6TQjr4uWYTv8ZfoL", "fee": 1400000, "feeAssetId": null, "timestamp": 1566212249500, "version": 1, "sender": "3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni", "senderPublicKey": "5qEf6v7n4Cm55KWEaSs76eUft3uwLezLoJeBrf6u9BKE", "proofs": [ "3BbUPj5uC8y5M18EXHfzPd8J19d1c1845kzkrErmtda8sv4Sg411w3vereX45Hq4fbMFnPkt58XPpiy3wsVVgRkL" ], "script": "base64:AAIDAAAAAAAAAAAAAAAGAAAAAAhvd25lcktleQIAAAAFb3duZXIAAAAACndhdmVzVG9rZW4FAAAABHVuaXQBAAAACXBheW1lbnRPZgAAAAEAAAADa2V5CQABLAAAAAICAAAAC3BheW1lbnRfb2ZfBQAAAANrZXkBAAAACHN0YXR1c09mAAAAAQAAAANrZXkJAAEsAAAAAgIAAAAKc3RhdHVzX29mXwUAAAADa2V5AAAAAAVvd25lcgkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABCQEAAAAFdmFsdWUAAAABCQAEHQAAAAIFAAAABHRoaXMFAAAACG93bmVyS2V5AQAAABBpc1BheW1lbnRQZW5kaW5nAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAApzdGF0dXNfb2ZfBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAkAAAAAAAACBQAAAAFzAgAAAAdwZW5kaW5nBwAAAAQAAAABaQEAAAAEaW5pdAAAAAIAAAAFb3duZXIA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gAAAAECAAAAJ3BheW1lbnQgaW4gYXNzZXRUb2tlbnMgbXVzdCBiZSBhdHRhY2hlZAkAAAIAAAABAgAAAChPcmRlciBhbHJlYWR5IGhhcyBiZWVuIHBheWVkIG9yIHJlamVjdGVkAAAAAWkBAAAABnJlamVjdAAAAAEAAAADa2V5AwkBAAAAEGlzUGF5bWVudFBlbmRpbmcAAAABBQAAAANrZXkJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAAhzdGF0dXNPZgAAAAEFAAAAA2tleQIAAAAIcmVqZWN0ZWQFAAAAA25pbAkAAAIAAAABAgAAAChPcmRlciBhbHJlYWR5IGhhcyBiZWVuIHBheWVkIG9yIHJlamVjdGVkAAAAACECeHM=", "chainId": 84, "height": 637942, "spentComplexity": 0 } View: original | compacted Prev: CupGayTDekxhm9CbB55P9J4E17q6aEVPGyHdkGAQWYzx Next: CSrrtvcWK5PNkVHx3SH6JA5dhUhrLqw3QC1kKeP7Rzay Diff:
OldNewDifferences
3737 func pay (key) = if (true)
3838 then match i.payment {
3939 case a: AttachedPayment =>
40- if ((a.assetId == wavesToken))
40+ if ((a.assetId == unit))
4141 then {
4242 let data = WriteSet([DataEntry("status_of_test", "paid")])
43- ScriptResult(data, TransferSet([ScriptTransfer(owner, 10, wavesToken)]))
43+ ScriptResult(data, TransferSet([ScriptTransfer(Address(base58'3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni'), 10, wavesToken)]))
4444 }
4545 else throw("can only WAVES, but got ")
4646 case _ =>
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, ("status_of_" + 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)
3737 func pay (key) = if (true)
3838 then match i.payment {
3939 case a: AttachedPayment =>
40- if ((a.assetId == wavesToken))
40+ if ((a.assetId == unit))
4141 then {
4242 let data = WriteSet([DataEntry("status_of_test", "paid")])
43- ScriptResult(data, TransferSet([ScriptTransfer(owner, 10, wavesToken)]))
43+ ScriptResult(data, TransferSet([ScriptTransfer(Address(base58'3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni'), 10, wavesToken)]))
4444 }
4545 else throw("can only WAVES, but got ")
4646 case _ =>
4747 throw("payment in assetTokens must be attached")
4848 }
4949 else throw("Order already has been payed or rejected")
5050
5151
5252
5353 @Callable(i)
5454 func reject (key) = if (isPaymentPending(key))
5555 then WriteSet([DataEntry(statusOf(key), "rejected")])
5656 else throw("Order already has been payed or rejected")
5757
5858

github/deemru/w8io/026f985 
21.69 ms