tx · FG63uUy3c54JwQS85cG116fBMfRgW5FqLFzwdxLfnimu
3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa: -0.01400000 Waves
2019.09.08 11:46 [666874] smart account 3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa > SELF 0.00000000 Waves
{
"type": 13,
"id": "FG63uUy3c54JwQS85cG116fBMfRgW5FqLFzwdxLfnimu",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1567932401812,
"version": 1,
"sender": "3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa",
"senderPublicKey": "HktRLq8bnL31myXeh7WVXAuMw8Qb7yrhPfMVxucQVeU",
"proofs": [
"3PLTbGzEhwvzE7cAkStKmmPmbZJ167Yp4s8BiZEhqSXTEJz7xyxEaovff1Q2NHT8xK8exkszXchwxvEYBBb1TLaM"
],
"script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAdzZXRob21lAAAAAQAAAAZob21lSWQEAAAAFXNlbGxlclB1YmxpY0tleUJhc2U1OAkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkEAAAABXdyaXRlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABVzZWxsZXJQdWJsaWNLZXlCYXNlNTgFAAAABmhvbWVJZAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAAFd3JpdGUJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAA25pbAAAAAFpAQAAAARtYWluAAAAAgAAAA9zZWxsZXJQdWJsaWNLZXkAAAAGaG9tZUlkBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVcGF5bWVudCBpcyBvbmx5IHdhdmVzBAAAABNidWVyUHVibGljS2V5QmFzZTU4CQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQQAAAAVc2VsbGVyUHVibGljS2V5QmFzZTU4CQACWAAAAAEFAAAAD3NlbGxlclB1YmxpY0tleQQAAAAPZGF0YUZyb21TdG9yYWdlBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAFXNlbGxlclB1YmxpY0tleUJhc2U1OAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAARob21lBQAAAAckbWF0Y2gwBQAAAARob21lAgAAAAEwAwkAAAAAAAACBQAAAA9kYXRhRnJvbVN0b3JhZ2UCAAAAATAJAAACAAAAAQIAAAAPc2VsbGVyIGhvbWVsZXNzBAAAAAh0cmFuc2ZlcgkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEFAAAAD3NlbGxlclB1YmxpY0tleQgFAAAAA3BtdAAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAQAAAAFd3JpdGUJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAFXNlbGxlclB1YmxpY0tleUJhc2U1OAIAAAABMAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAATYnVlclB1YmxpY0tleUJhc2U1OAUAAAAGaG9tZUlkBQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAV3cml0ZQUAAAAIdHJhbnNmZXIAAAAAZeZs1g==",
"chainId": 84,
"height": 666874,
"spentComplexity": 0
}
View: original | compacted
Prev: 5JEv5kQkKPcYBj2k5pnRmsVtrLJmew4Zc2x6a2M6aUbt
Next: 4rnxG9m88jNcQZaJBX6ZegGZQY2sRhopcv16PnRjrK7s
Diff:
Old | New | | Differences |
---|
20 | 20 | | else { |
---|
21 | 21 | | let buerPublicKeyBase58 = toBase58String(i.callerPublicKey) |
---|
22 | 22 | | let sellerPublicKeyBase58 = toBase58String(sellerPublicKey) |
---|
23 | | - | let dataFromStorage = getString(this, sellerPublicKeyBase58) |
---|
| 23 | + | let dataFromStorage = match getString(this, sellerPublicKeyBase58) { |
---|
| 24 | + | case home: String => |
---|
| 25 | + | home |
---|
| 26 | + | case _ => |
---|
| 27 | + | "0" |
---|
| 28 | + | } |
---|
24 | 29 | | if ((dataFromStorage == "0")) |
---|
25 | 30 | | then throw("seller homeless") |
---|
26 | 31 | | else { |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func sethome (homeId) = { |
---|
8 | 8 | | let sellerPublicKeyBase58 = toBase58String(i.callerPublicKey) |
---|
9 | 9 | | let write = WriteSet([DataEntry(sellerPublicKeyBase58, homeId)]) |
---|
10 | 10 | | ScriptResult(write, TransferSet(nil)) |
---|
11 | 11 | | } |
---|
12 | 12 | | |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
15 | 15 | | @Callable(i) |
---|
16 | 16 | | func main (sellerPublicKey,homeId) = { |
---|
17 | 17 | | let pmt = extract(i.payment) |
---|
18 | 18 | | if (isDefined(pmt.assetId)) |
---|
19 | 19 | | then throw("payment is only waves") |
---|
20 | 20 | | else { |
---|
21 | 21 | | let buerPublicKeyBase58 = toBase58String(i.callerPublicKey) |
---|
22 | 22 | | let sellerPublicKeyBase58 = toBase58String(sellerPublicKey) |
---|
23 | | - | let dataFromStorage = getString(this, sellerPublicKeyBase58) |
---|
| 23 | + | let dataFromStorage = match getString(this, sellerPublicKeyBase58) { |
---|
| 24 | + | case home: String => |
---|
| 25 | + | home |
---|
| 26 | + | case _ => |
---|
| 27 | + | "0" |
---|
| 28 | + | } |
---|
24 | 29 | | if ((dataFromStorage == "0")) |
---|
25 | 30 | | then throw("seller homeless") |
---|
26 | 31 | | else { |
---|
27 | 32 | | let transfer = TransferSet([ScriptTransfer(Address(sellerPublicKey), pmt.amount, unit)]) |
---|
28 | 33 | | let write = WriteSet([DataEntry(sellerPublicKeyBase58, "0"), DataEntry(buerPublicKeyBase58, homeId)]) |
---|
29 | 34 | | ScriptResult(write, transfer) |
---|
30 | 35 | | } |
---|
31 | 36 | | } |
---|
32 | 37 | | } |
---|
33 | 38 | | |
---|
34 | 39 | | |
---|