tx · EVHrd9tW8ZzfLwmPULQc7MzhainWe4iueVzMMevZnxYN
3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6: -0.01000000 Waves
2021.06.29 06:33 [1591132] smart account 3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6 > SELF 0.00000000 Waves
{
"type": 13,
"id": "EVHrd9tW8ZzfLwmPULQc7MzhainWe4iueVzMMevZnxYN",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1624937699062,
"version": 2,
"chainId": 84,
"sender": "3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6",
"senderPublicKey": "4f5Wt4MDH3Qt6DMuZQid3zoj463xCUkNdUWjUcChuedh",
"proofs": [
"f6mPuiaCY4dTKhcqGcv4tiuNo18ijjiXSEe5Sy4rkF576wio3uUwDqStpBEeFJeE648vkWooYgvHqD3jP88Qbfw"
],
"script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAAAAAAEAAAABaQEAAAAHYnV5VW5pdAAAAAEAAAAHYXNzZXRJRAQAAAAEY29zdAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABWNvc3RfBQAAAAdhc3NldElEAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVd29ya3Mgd2l0aCB3YXZlcyBvbmx5AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABGNvc3QJAAACAAAAAQIAAAAKV3JvbmcgY29zdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEJAAJZAAAAAQUAAAAHYXNzZXRJRAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAABm93bmVyXwUAAAAHYXNzZXRJRAkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAANuaWwAAAAAFrotNQ==",
"height": 1591132,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 3US8yBVomwqsKUG2f8qgkgPs3qMqUejvb5eLGXtTskwx
Next: 9KzgwV3mmEDLawszw8dv3KHnqwBmp7qyK3gEdg1eUXjd
Diff:
Old | New | | Differences |
---|
15 | 15 | | if (isDefined(pmt.assetId)) |
---|
16 | 16 | | then throw("works with waves only") |
---|
17 | 17 | | else if ((pmt.amount != cost)) |
---|
18 | | - | then throw("Wrong service fee amount") |
---|
19 | | - | else [ScriptTransfer(i.caller, 1, fromBase58String(assetID))] |
---|
| 18 | + | then throw("Wrong cost") |
---|
| 19 | + | else [ScriptTransfer(i.caller, 1, fromBase58String(assetID)), StringEntry(("owner_" + assetID), toBase58String(i.caller.bytes))] |
---|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func buyUnit (assetID) = { |
---|
8 | 8 | | let cost = match getInteger(this, ("cost_" + assetID)) { |
---|
9 | 9 | | case a: Int => |
---|
10 | 10 | | a |
---|
11 | 11 | | case _ => |
---|
12 | 12 | | 0 |
---|
13 | 13 | | } |
---|
14 | 14 | | let pmt = value(i.payments[0]) |
---|
15 | 15 | | if (isDefined(pmt.assetId)) |
---|
16 | 16 | | then throw("works with waves only") |
---|
17 | 17 | | else if ((pmt.amount != cost)) |
---|
18 | | - | then throw("Wrong service fee amount") |
---|
19 | | - | else [ScriptTransfer(i.caller, 1, fromBase58String(assetID))] |
---|
| 18 | + | then throw("Wrong cost") |
---|
| 19 | + | else [ScriptTransfer(i.caller, 1, fromBase58String(assetID)), StringEntry(("owner_" + assetID), toBase58String(i.caller.bytes))] |
---|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|