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
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | let a = base58'5gvKrU3yetdPyMisTo8JiE737U9ZXLp4XkCy2aeE7BbA' |
---|
4 | 5 | | |
---|
5 | | - | |
---|
6 | | - | @Callable(a) |
---|
7 | | - | func buyUnit (b) = { |
---|
8 | | - | let c = { |
---|
9 | | - | let d = getInteger(this, ("cost_" + b)) |
---|
10 | | - | if ($isInstanceOf(d, "Int")) |
---|
| 6 | + | @Callable(b) |
---|
| 7 | + | func buyUnit (c) = { |
---|
| 8 | + | let d = { |
---|
| 9 | + | let e = getInteger(this, ("cost_" + c)) |
---|
| 10 | + | if ($isInstanceOf(e, "Int")) |
---|
11 | 11 | | then { |
---|
12 | | - | let e = d |
---|
13 | | - | e |
---|
| 12 | + | let f = e |
---|
| 13 | + | f |
---|
14 | 14 | | } |
---|
15 | 15 | | else 0 |
---|
16 | 16 | | } |
---|
17 | | - | let f = value(a.payments[0]) |
---|
18 | | - | if (isDefined(f.assetId)) |
---|
| 17 | + | let g = value(b.payments[0]) |
---|
| 18 | + | if (isDefined(g.assetId)) |
---|
19 | 19 | | then throw("works with waves only") |
---|
20 | | - | else if ((f.amount != c)) |
---|
| 20 | + | else if ((g.amount != d)) |
---|
21 | 21 | | then throw("Wrong cost") |
---|
22 | | - | else [ScriptTransfer(a.caller, 1, fromBase58String(b)), StringEntry(("owner_" + b), toBase58String(a.caller.bytes))] |
---|
| 22 | + | else [ScriptTransfer(b.caller, 1, fromBase58String(c)), StringEntry(("owner_" + c), toBase58String(b.caller.bytes))] |
---|
| 23 | + | } |
---|
| 24 | + | |
---|
| 25 | + | |
---|
| 26 | + | |
---|
| 27 | + | @Callable(b) |
---|
| 28 | + | func goToForest (c) = { |
---|
| 29 | + | let h = { |
---|
| 30 | + | let e = getString(this, ("owner_" + c)) |
---|
| 31 | + | if ($isInstanceOf(e, "String")) |
---|
| 32 | + | then { |
---|
| 33 | + | let f = e |
---|
| 34 | + | f |
---|
| 35 | + | } |
---|
| 36 | + | else "" |
---|
| 37 | + | } |
---|
| 38 | + | let i = toBase58String(b.caller.bytes) |
---|
| 39 | + | if ((i != h)) |
---|
| 40 | + | then throw("You are not owner!") |
---|
| 41 | + | else [ScriptTransfer(b.caller, 500000, a), IntegerEntry(("balance_" + toBase58String(b.caller.bytes)), 500000)] |
---|
23 | 42 | | } |
---|
24 | 43 | | |
---|
25 | 44 | | |
---|