tx · bWkkKRqwv9Lof8L6Nb3vJs6hrsUV1psRSmGR6H5WVjv
3N7ufBZVuVJtEPVnZAUjpffreNUxCYsb6Vk: -0.01400000 Waves
2021.03.09 19:27 [1430373] smart account 3N7ufBZVuVJtEPVnZAUjpffreNUxCYsb6Vk > SELF 0.00000000 Waves
{
"type": 13,
"id": "bWkkKRqwv9Lof8L6Nb3vJs6hrsUV1psRSmGR6H5WVjv",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1615307252099,
"version": 2,
"chainId": 84,
"sender": "3N7ufBZVuVJtEPVnZAUjpffreNUxCYsb6Vk",
"senderPublicKey": "8rDvQxFR9tYKSwAaR4umUxBMj37GmcVY3VtWAjLyJu62",
"proofs": [
"2USvHtntK84YLZrPLe8a7YjSXoHLjUFZbNrx5BomjS7UXNWHpce38CteRJC4buLQQL6rYsBHHiUqxp6uBa8M3RR"
],
"script": "base64:AAIDAAAAAAAAAAcIARIDCgEBAAAAAAAAAAEAAAABaQEAAAAHZ2V0VW5pdAAAAAEAAAAGdW5pdGlkBAAAAAt1bml0QXNzZXRJZAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzCQABLAAAAAICAAAABXVuaXRfCQABpAAAAAEFAAAABnVuaXRpZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAAEAAAABGNvc3QEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAVjb3N0XwUAAAALdW5pdEFzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAFXdvcmtzIHdpdGggd2F2ZXMgb25seQMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAARjb3N0CQAAAgAAAAECAAAAGFdyb25nIHNlcnZpY2UgZmVlIGFtb3VudAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEJAAGbAAAAAQUAAAALdW5pdEFzc2V0SWQFAAAAA25pbAAAAAB1MP8b",
"height": 1430373,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 4DoVwma7tCR5zNAFmhhh9q64aH8wsMeLvKCmVvQe6pYP
Next: 8sVbaVvoKfjAdttfxp2erpYc6vp1gichDJ1EBryHUXQ8
Diff:
Old | New | | Differences |
---|
22 | 22 | | then throw("works with waves only") |
---|
23 | 23 | | else if ((pmt.amount != cost)) |
---|
24 | 24 | | then throw("Wrong service fee amount") |
---|
25 | | - | else TransferSet([ScriptTransfer(i.caller, 1, unit)]) |
---|
| 25 | + | else TransferSet([ScriptTransfer(i.caller, 1, toBytes(unitAssetId))]) |
---|
26 | 26 | | } |
---|
27 | | - | |
---|
28 | | - | |
---|
29 | | - | |
---|
30 | | - | @Callable(i) |
---|
31 | | - | func setTextDef () = WriteSet([DataEntry("demo", 12)]) |
---|
32 | 27 | | |
---|
33 | 28 | | |
---|
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 getUnit (unitid) = { |
---|
8 | 8 | | let unitAssetId = match getString(this, ("unit_" + toString(unitid))) { |
---|
9 | 9 | | case a: String => |
---|
10 | 10 | | a |
---|
11 | 11 | | case _ => |
---|
12 | 12 | | "" |
---|
13 | 13 | | } |
---|
14 | 14 | | let cost = match getInteger(this, ("cost_" + unitAssetId)) { |
---|
15 | 15 | | case a: Int => |
---|
16 | 16 | | a |
---|
17 | 17 | | case _ => |
---|
18 | 18 | | 0 |
---|
19 | 19 | | } |
---|
20 | 20 | | let pmt = extract(i.payment) |
---|
21 | 21 | | if (isDefined(pmt.assetId)) |
---|
22 | 22 | | then throw("works with waves only") |
---|
23 | 23 | | else if ((pmt.amount != cost)) |
---|
24 | 24 | | then throw("Wrong service fee amount") |
---|
25 | | - | else TransferSet([ScriptTransfer(i.caller, 1, unit)]) |
---|
| 25 | + | else TransferSet([ScriptTransfer(i.caller, 1, toBytes(unitAssetId))]) |
---|
26 | 26 | | } |
---|
27 | | - | |
---|
28 | | - | |
---|
29 | | - | |
---|
30 | | - | @Callable(i) |
---|
31 | | - | func setTextDef () = WriteSet([DataEntry("demo", 12)]) |
---|
32 | 27 | | |
---|
33 | 28 | | |
---|