tx · 4rnxG9m88jNcQZaJBX6ZegGZQY2sRhopcv16PnRjrK7s

3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa:  -0.01400000 Waves

2019.09.08 11:50 [666878] smart account 3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa > SELF 0.00000000 Waves

{ "type": 13, "id": "4rnxG9m88jNcQZaJBX6ZegGZQY2sRhopcv16PnRjrK7s", "fee": 1400000, "feeAssetId": null, "timestamp": 1567932641391, "version": 1, "sender": "3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa", "senderPublicKey": "HktRLq8bnL31myXeh7WVXAuMw8Qb7yrhPfMVxucQVeU", "proofs": [ "wZdUB8BHpjSoeXsP4CMCHNArkQ1RJ4yUa4XVJLLPC8reDJkPmeG6eZPgxDUV84Autr6a1d8Af9FMck6GH1RyFL9" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAdzZXRob21lAAAAAQAAAAZob21lSWQEAAAAFXNlbGxlclB1YmxpY0tleUJhc2U1OAkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkEAAAABXdyaXRlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABVzZWxsZXJQdWJsaWNLZXlCYXNlNTgFAAAABmhvbWVJZAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAAFd3JpdGUJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAA25pbAAAAAFpAQAAAARtYWluAAAAAgAAAA9zZWxsZXJQdWJsaWNLZXkAAAAGaG9tZUlkBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVcGF5bWVudCBpcyBvbmx5IHdhdmVzBAAAABNidWVyUHVibGljS2V5QmFzZTU4CQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQQAAAAVc2VsbGVyUHVibGljS2V5QmFzZTU4CQACWAAAAAEFAAAAD3NlbGxlclB1YmxpY0tleQQAAAAPZGF0YUZyb21TdG9yYWdlBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAFXNlbGxlclB1YmxpY0tleUJhc2U1OAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAARob21lBQAAAAckbWF0Y2gwBQAAAARob21lAgAAAAEwAwkAAAAAAAACBQAAAA9kYXRhRnJvbVN0b3JhZ2UCAAAAATAEAAAABXdyaXRlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABVzZWxsZXJQdWJsaWNLZXlCYXNlNTgCAAAAAU4FAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAABXdyaXRlCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwEAAAACHRyYW5zZmVyCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQUAAAAPc2VsbGVyUHVibGljS2V5CAUAAAADcG10AAAABmFtb3VudAUAAAAEdW5pdAUAAAADbmlsBAAAAAV3cml0ZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAVc2VsbGVyUHVibGljS2V5QmFzZTU4AgAAAAEwCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABNidWVyUHVibGljS2V5QmFzZTU4BQAAAAZob21lSWQFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAABXdyaXRlBQAAAAh0cmFuc2ZlcgAAAACMV6UK", "chainId": 84, "height": 666878, "spentComplexity": 0 } View: original | compacted Prev: FG63uUy3c54JwQS85cG116fBMfRgW5FqLFzwdxLfnimu Next: GxavBpvWcLG39tha3kpuhZxBVpBePms6v7Tf89JNuodT Diff:
OldNewDifferences
2727 "0"
2828 }
2929 if ((dataFromStorage == "0"))
30- then throw("seller homeless")
30+ then {
31+ let write = WriteSet([DataEntry(sellerPublicKeyBase58, "N")])
32+ ScriptResult(write, TransferSet(nil))
33+ }
3134 else {
3235 let transfer = TransferSet([ScriptTransfer(Address(sellerPublicKey), pmt.amount, unit)])
3336 let write = WriteSet([DataEntry(sellerPublicKeyBase58, "0"), DataEntry(buerPublicKeyBase58, homeId)])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func sethome (homeId) = {
88 let sellerPublicKeyBase58 = toBase58String(i.callerPublicKey)
99 let write = WriteSet([DataEntry(sellerPublicKeyBase58, homeId)])
1010 ScriptResult(write, TransferSet(nil))
1111 }
1212
1313
1414
1515 @Callable(i)
1616 func main (sellerPublicKey,homeId) = {
1717 let pmt = extract(i.payment)
1818 if (isDefined(pmt.assetId))
1919 then throw("payment is only waves")
2020 else {
2121 let buerPublicKeyBase58 = toBase58String(i.callerPublicKey)
2222 let sellerPublicKeyBase58 = toBase58String(sellerPublicKey)
2323 let dataFromStorage = match getString(this, sellerPublicKeyBase58) {
2424 case home: String =>
2525 home
2626 case _ =>
2727 "0"
2828 }
2929 if ((dataFromStorage == "0"))
30- then throw("seller homeless")
30+ then {
31+ let write = WriteSet([DataEntry(sellerPublicKeyBase58, "N")])
32+ ScriptResult(write, TransferSet(nil))
33+ }
3134 else {
3235 let transfer = TransferSet([ScriptTransfer(Address(sellerPublicKey), pmt.amount, unit)])
3336 let write = WriteSet([DataEntry(sellerPublicKeyBase58, "0"), DataEntry(buerPublicKeyBase58, homeId)])
3437 ScriptResult(write, transfer)
3538 }
3639 }
3740 }
3841
3942

github/deemru/w8io/169f3d6 
29.26 ms