tx · 9KzgwV3mmEDLawszw8dv3KHnqwBmp7qyK3gEdg1eUXjd
3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6: -0.01000000 Waves
2021.06.29 21:09 [1592013] smart account 3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6 > SELF 0.00000000 Waves
{
"type": 13,
"id": "9KzgwV3mmEDLawszw8dv3KHnqwBmp7qyK3gEdg1eUXjd",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1624990229177,
"version": 2,
"chainId": 84,
"sender": "3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6",
"senderPublicKey": "4f5Wt4MDH3Qt6DMuZQid3zoj463xCUkNdUWjUcChuedh",
"proofs": [
"5TaKro8dcoEqw99CE4iFR85YZJzduDPLarVa7AioMtUuZ6zW67HqXy9qd1bxu776K9GGEjcCb7AfhYAr7DkHZHsJ"
],
"script": "base64:AAIEAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAABAAAAAANKUE4BAAAAIEWosa+NzBSCTrxR5r/Cgx/KgydxqGORZyLGDZkX6IzFAAAAAgAAAAFpAQAAAAdidXlVbml0AAAAAQAAAAdhc3NldElEBAAAAARjb3N0BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAFY29zdF8FAAAAB2Fzc2V0SUQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAABV3b3JrcyB3aXRoIHdhdmVzIG9ubHkDCQEAAAACIT0AAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAEY29zdAkAAAIAAAABAgAAAApXcm9uZyBjb3N0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQkAAlkAAAABBQAAAAdhc3NldElECQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgIAAAAGb3duZXJfBQAAAAdhc3NldElECQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAAA25pbAAAAAFpAQAAAApnb1RvRm9yZXN0AAAAAQAAAAdhc3NldElEBAAAAAVvd25lcgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzCQABLAAAAAICAAAABm93bmVyXwUAAAAHYXNzZXRJRAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAAEAAAABmNhbGxlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwkBAAAAAiE9AAAAAgUAAAAGY2FsbGVyBQAAAAVvd25lcgkAAAIAAAABAgAAABJZb3UgYXJlIG5vdCBvd25lciEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAB6EgBQAAAANKUE4JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAIYmFsYW5jZV8JAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwAAAAAAAAehIAUAAAADbmlsAAAAANMt718=",
"height": 1592013,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: EVHrd9tW8ZzfLwmPULQc7MzhainWe4iueVzMMevZnxYN
Next: AqoeGjEuDZS3F8e1Boyv5h4GjYCi9hxp8DuRd5q8crDc
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | |
---|
| 4 | + | let JPN = base58'5gvKrU3yetdPyMisTo8JiE737U9ZXLp4XkCy2aeE7BbA' |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func buyUnit (assetID) = { |
---|
|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
| 23 | + | |
---|
| 24 | + | @Callable(i) |
---|
| 25 | + | func goToForest (assetID) = { |
---|
| 26 | + | let owner = match getString(this, ("owner_" + assetID)) { |
---|
| 27 | + | case a: String => |
---|
| 28 | + | a |
---|
| 29 | + | case _ => |
---|
| 30 | + | "" |
---|
| 31 | + | } |
---|
| 32 | + | let caller = toBase58String(i.caller.bytes) |
---|
| 33 | + | if ((caller != owner)) |
---|
| 34 | + | then throw("You are not owner!") |
---|
| 35 | + | else [ScriptTransfer(i.caller, 500000, JPN), IntegerEntry(("balance_" + toBase58String(i.caller.bytes)), 500000)] |
---|
| 36 | + | } |
---|
| 37 | + | |
---|
| 38 | + | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | |
---|
| 4 | + | let JPN = base58'5gvKrU3yetdPyMisTo8JiE737U9ZXLp4XkCy2aeE7BbA' |
---|
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 | 18 | | then throw("Wrong cost") |
---|
19 | 19 | | else [ScriptTransfer(i.caller, 1, fromBase58String(assetID)), StringEntry(("owner_" + assetID), toBase58String(i.caller.bytes))] |
---|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
| 23 | + | |
---|
| 24 | + | @Callable(i) |
---|
| 25 | + | func goToForest (assetID) = { |
---|
| 26 | + | let owner = match getString(this, ("owner_" + assetID)) { |
---|
| 27 | + | case a: String => |
---|
| 28 | + | a |
---|
| 29 | + | case _ => |
---|
| 30 | + | "" |
---|
| 31 | + | } |
---|
| 32 | + | let caller = toBase58String(i.caller.bytes) |
---|
| 33 | + | if ((caller != owner)) |
---|
| 34 | + | then throw("You are not owner!") |
---|
| 35 | + | else [ScriptTransfer(i.caller, 500000, JPN), IntegerEntry(("balance_" + toBase58String(i.caller.bytes)), 500000)] |
---|
| 36 | + | } |
---|
| 37 | + | |
---|
| 38 | + | |
---|