tx · ERYvXaYDVMriaqf5uzEpc34WLFWEcaFh9WevPpZMezsd

3MsnqrturHXhdafP9hcTWPR8itA45Dhi8Vf:  -0.01400000 Waves

2019.09.08 11:19 [666851] smart account 3MsnqrturHXhdafP9hcTWPR8itA45Dhi8Vf > SELF 0.00000000 Waves

{ "type": 13, "id": "ERYvXaYDVMriaqf5uzEpc34WLFWEcaFh9WevPpZMezsd", "fee": 1400000, "feeAssetId": null, "timestamp": 1567930676697, "version": 1, "sender": "3MsnqrturHXhdafP9hcTWPR8itA45Dhi8Vf", "senderPublicKey": "Ay1kdmnYtYnRcPrALAU8cwVh6iUU2GvSRKyJztSWeJ3Z", "proofs": [ "2TFZHR3T4QJ56PHYgSrz2UjYTKVTeuP3pzWFrEp5rRbSp1GmoxSW8CGEMt3zB9kukoye6pgmtq2HuwRKQh4zXR5R" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAdzZXRob21lAAAAAQAAAAZob21lSWQEAAAAFXNlbGxlclB1YmxpY0tleUJhc2U1OAkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkEAAAABXdyaXRlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABVzZWxsZXJQdWJsaWNLZXlCYXNlNTgFAAAABmhvbWVJZAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAAFd3JpdGUJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAA25pbAAAAAFpAQAAAARtYWluAAAAAgAAAA9zZWxsZXJQdWJsaWNLZXkAAAAGaG9tZUlkBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVcGF5bWVudCBpcyBvbmx5IHdhdmVzBAAAABNidWVyUHVibGljS2V5QmFzZTU4CQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQQAAAAVc2VsbGVyUHVibGljS2V5QmFzZTU4CQACWAAAAAEFAAAAD3NlbGxlclB1YmxpY0tleQQAAAAPZGF0YUZyb21TdG9yYWdlCQAEHQAAAAIFAAAABHRoaXMFAAAAFXNlbGxlclB1YmxpY0tleUJhc2U1OAMDCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAAPZGF0YUZyb21TdG9yYWdlCQEAAAACIT0AAAACBQAAAA9kYXRhRnJvbVN0b3JhZ2UCAAAAATAHBAAAAAh0cmFuc2ZlcgkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEFAAAAD3NlbGxlclB1YmxpY0tleQgFAAAAA3BtdAAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAQAAAAFd3JpdGUJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAFXNlbGxlclB1YmxpY0tleUJhc2U1OAIAAAABMAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAATYnVlclB1YmxpY0tleUJhc2U1OAUAAAAGaG9tZUlkBQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAV3cml0ZQUAAAAIdHJhbnNmZXIJAAACAAAAAQIAAAAPc2VsbGVyIGhvbWVsZXNzAAAAAIfD+v0=", "chainId": 84, "height": 666851, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+
5+
6+@Callable(i)
7+func sethome (homeId) = {
8+ let sellerPublicKeyBase58 = toBase58String(i.callerPublicKey)
9+ let write = WriteSet([DataEntry(sellerPublicKeyBase58, homeId)])
10+ ScriptResult(write, TransferSet(nil))
11+ }
12+
13+
14+
15+@Callable(i)
16+func main (sellerPublicKey,homeId) = {
17+ let pmt = extract(i.payment)
18+ if (isDefined(pmt.assetId))
19+ then throw("payment is only waves")
20+ else {
21+ let buerPublicKeyBase58 = toBase58String(i.callerPublicKey)
22+ let sellerPublicKeyBase58 = toBase58String(sellerPublicKey)
23+ let dataFromStorage = getString(this, sellerPublicKeyBase58)
24+ if (if (isDefined(dataFromStorage))
25+ then (dataFromStorage != "0")
26+ else false)
27+ then {
28+ let transfer = TransferSet([ScriptTransfer(Address(sellerPublicKey), pmt.amount, unit)])
29+ let write = WriteSet([DataEntry(sellerPublicKeyBase58, "0"), DataEntry(buerPublicKeyBase58, homeId)])
30+ ScriptResult(write, transfer)
31+ }
32+ else throw("seller homeless")
33+ }
34+ }
35+
36+

github/deemru/w8io/026f985 
17.39 ms