tx · A8E2ZTyJqvFnB2gHk6i2NbxG7xVz23ASTKXaqhPYdum 3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa: -0.01400000 Waves 2019.09.08 14:40 [667055] smart account 3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa > SELF 0.00000000 Waves
{ "type": 13, "id": "A8E2ZTyJqvFnB2gHk6i2NbxG7xVz23ASTKXaqhPYdum", "fee": 1400000, "feeAssetId": null, "timestamp": 1567942828185, "version": 1, "sender": "3MvqUEAdK8oa1jDS82eqYYVoHTX3S71rRPa", "senderPublicKey": "HktRLq8bnL31myXeh7WVXAuMw8Qb7yrhPfMVxucQVeU", "proofs": [ "iu5Cuefb4kiXV2TZesCYSxNGZrBE8XwVDUPbYWZJ1dV3xtuvK2dxxfN7PjUWCgVnwbE5QdWp8Y9MLKJyfucKkNz" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAAAAAAhudWxsSG9tZQIAAAABMAAAAAIAAAABaQEAAAAHc2V0aG9tZQAAAAEAAAAGaG9tZUlkBAAAAAxzZWxsZXJCYXNlNTgJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFd3JpdGUJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADHNlbGxlckJhc2U1OAUAAAAGaG9tZUlkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAApzZXRob21lTG9nCQABLAAAAAIJAAEsAAAAAgUAAAAMc2VsbGVyQmFzZTU4AgAAAAQgLT4gBQAAAAZob21lSWQFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAABXdyaXRlCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwAAAABaQEAAAAEbWFpbgAAAAIAAAAGaG9tZUlkAAAAB2FkZHJlc3MEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWl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, "spentComplexity": 0 } View: original | compacted Prev: HuVV1ZJRw7duKviiAeatcbqCTP23D7EsFLWioC1CW7qR Next: AH384wpaMq4yhrCTUzNXFKij2JRHhb5AW5Lh8hhwqx9J Diff:
Old | New | Differences | |
---|---|---|---|
13 | 13 | ||
14 | 14 | ||
15 | 15 | @Callable(i) | |
16 | - | func main ( | |
16 | + | func main (homeId,address) = { | |
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 buerBase58 = toBase58String(i.caller.bytes) | |
22 | - | let sellerAddress = addressFromPublicKey(sellerVector) | |
23 | - | match getString(this, address) { | |
24 | - | case home: String => | |
25 | - | let transfer = TransferSet([ScriptTransfer(sellerAddress, pmt.amount, pmt.assetId)]) | |
26 | - | let write = WriteSet([DataEntry(address, nullHome), DataEntry(buerBase58, homeId), DataEntry("mainLog", ((address + " -> ") + buerBase58))]) | |
27 | - | ScriptResult(write, transfer) | |
22 | + | match addressFromString(address) { | |
23 | + | case addressObject: Address => | |
24 | + | match getString(this, address) { | |
25 | + | case home: String => | |
26 | + | let transfer = TransferSet([ScriptTransfer(addressObject, pmt.amount, pmt.assetId)]) | |
27 | + | let write = WriteSet([DataEntry(address, nullHome), DataEntry(buerBase58, homeId), DataEntry("mainLog", ((address + " -> ") + buerBase58))]) | |
28 | + | ScriptResult(write, transfer) | |
29 | + | case _ => | |
30 | + | throw("saller homeless") | |
31 | + | } | |
28 | 32 | case _ => | |
29 | - | throw(" | |
33 | + | throw("Invalid address") | |
30 | 34 | } | |
31 | 35 | } | |
32 | 36 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let nullHome = "0" | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func sethome (homeId) = { | |
8 | 8 | let sellerBase58 = toBase58String(i.caller.bytes) | |
9 | 9 | let write = WriteSet([DataEntry(sellerBase58, homeId), DataEntry("sethomeLog", ((sellerBase58 + " -> ") + homeId))]) | |
10 | 10 | ScriptResult(write, TransferSet(nil)) | |
11 | 11 | } | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | 15 | @Callable(i) | |
16 | - | func main ( | |
16 | + | func main (homeId,address) = { | |
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 buerBase58 = toBase58String(i.caller.bytes) | |
22 | - | let sellerAddress = addressFromPublicKey(sellerVector) | |
23 | - | match getString(this, address) { | |
24 | - | case home: String => | |
25 | - | let transfer = TransferSet([ScriptTransfer(sellerAddress, pmt.amount, pmt.assetId)]) | |
26 | - | let write = WriteSet([DataEntry(address, nullHome), DataEntry(buerBase58, homeId), DataEntry("mainLog", ((address + " -> ") + buerBase58))]) | |
27 | - | ScriptResult(write, transfer) | |
22 | + | match addressFromString(address) { | |
23 | + | case addressObject: Address => | |
24 | + | match getString(this, address) { | |
25 | + | case home: String => | |
26 | + | let transfer = TransferSet([ScriptTransfer(addressObject, pmt.amount, pmt.assetId)]) | |
27 | + | let write = WriteSet([DataEntry(address, nullHome), DataEntry(buerBase58, homeId), DataEntry("mainLog", ((address + " -> ") + buerBase58))]) | |
28 | + | ScriptResult(write, transfer) | |
29 | + | case _ => | |
30 | + | throw("saller homeless") | |
31 | + | } | |
28 | 32 | case _ => | |
29 | - | throw(" | |
33 | + | throw("Invalid address") | |
30 | 34 | } | |
31 | 35 | } | |
32 | 36 | } | |
33 | 37 | ||
34 | 38 |
github/deemru/w8io/169f3d6 26.88 ms ◑