tx · 2KAELd8c8ScHWQ85kVjx1g9M6JtxvoaiMK7QKG5jgAsX
3N7ufBZVuVJtEPVnZAUjpffreNUxCYsb6Vk: -0.14000000 Waves
2021.02.04 19:24 [1383668] smart account 3N7ufBZVuVJtEPVnZAUjpffreNUxCYsb6Vk > SELF 0.00000000 Waves
{
"type": 13,
"id": "2KAELd8c8ScHWQ85kVjx1g9M6JtxvoaiMK7QKG5jgAsX",
"fee": 14000000,
"feeAssetId": null,
"timestamp": 1612455899568,
"version": 2,
"chainId": 84,
"sender": "3N7ufBZVuVJtEPVnZAUjpffreNUxCYsb6Vk",
"senderPublicKey": "8rDvQxFR9tYKSwAaR4umUxBMj37GmcVY3VtWAjLyJu62",
"proofs": [
"3UfSvLngQEsYvambVotLAuKFbMPJMuPtrdRk1fGUuVeDe7YDWsEfs4BAdayLTZcvze31u1kwBxWiqAaJYzoTbXXQ"
],
"script": "base64:AAIDAAAAAAAAAAcIARIDCgEBAAAAAAAAAAEAAAABaQEAAAAHZ2V0VW5pdAAAAAEAAAAGdW5pdGlkBAAAAAt1bml0QXNzZXRJZAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzCQABLAAAAAICAAAABHVuaXQJAAGkAAAAAQUAAAAGdW5pdGlkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAQAAAAEY29zdAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABWNvc3RfBQAAAAt1bml0QXNzZXRJZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVd29ya3Mgd2l0aCB3YXZlcyBvbmx5AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABGNvc3QJAAACAAAAAQIAAAAYV3Jvbmcgc2VydmljZSBmZWUgYW1vdW50CQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQkAAZsAAAABBQAAAAt1bml0QXNzZXRJZAUAAAADbmlsAAAAANDEOZ8=",
"height": 1383668,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9sAGUFsG4pQNaqeeBdvESC79WCY8sx83x43Tm6VdBJvR
Next: 77mzXZTLjD5bqoHj7FjSdQBmJ4qPT7p7iaMwT5vikZ9g
Diff:
Old | New | | Differences |
---|
1 | | - | {-# STDLIB_VERSION 4 #-} |
---|
| 1 | + | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
|
17 | 17 | | case _ => |
---|
18 | 18 | | 0 |
---|
19 | 19 | | } |
---|
20 | | - | let pmt = if ((size(i.payments) == 1)) |
---|
21 | | - | then i.payments[0] |
---|
22 | | - | else throw("Attached payment is required") |
---|
| 20 | + | let pmt = extract(i.payment) |
---|
23 | 21 | | if (isDefined(pmt.assetId)) |
---|
24 | 22 | | then throw("works with waves only") |
---|
25 | 23 | | else if ((pmt.amount != cost)) |
---|
26 | 24 | | then throw("Wrong service fee amount") |
---|
27 | | - | else [ScriptTransfer(i.caller, 1, unit)] |
---|
| 25 | + | else TransferSet([ScriptTransfer(i.caller, 1, toBytes(unitAssetId))]) |
---|
28 | 26 | | } |
---|
29 | 27 | | |
---|
30 | 28 | | |
---|
Full:
Old | New | | Differences |
---|
1 | | - | {-# STDLIB_VERSION 4 #-} |
---|
| 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 | | - | let pmt = if ((size(i.payments) == 1)) |
---|
21 | | - | then i.payments[0] |
---|
22 | | - | else throw("Attached payment is required") |
---|
| 20 | + | let pmt = extract(i.payment) |
---|
23 | 21 | | if (isDefined(pmt.assetId)) |
---|
24 | 22 | | then throw("works with waves only") |
---|
25 | 23 | | else if ((pmt.amount != cost)) |
---|
26 | 24 | | then throw("Wrong service fee amount") |
---|
27 | | - | else [ScriptTransfer(i.caller, 1, unit)] |
---|
| 25 | + | else TransferSet([ScriptTransfer(i.caller, 1, toBytes(unitAssetId))]) |
---|
28 | 26 | | } |
---|
29 | 27 | | |
---|
30 | 28 | | |
---|