tx · DyxCb1b2XZbU6nZLsLSUxXmhZsARqwpqt3RtkYjwQtMj 3MwAuwYaF9e4ipM5fP8FQYpFvhtE8jnbtHk: -0.01000000 Waves 2022.03.31 02:12 [1987299] smart account 3MwAuwYaF9e4ipM5fP8FQYpFvhtE8jnbtHk > SELF 0.00000000 Waves
{ "type": 13, "id": "DyxCb1b2XZbU6nZLsLSUxXmhZsARqwpqt3RtkYjwQtMj", "fee": 1000000, "feeAssetId": null, "timestamp": 1648682005931, "version": 2, "chainId": 84, "sender": "3MwAuwYaF9e4ipM5fP8FQYpFvhtE8jnbtHk", "senderPublicKey": "EpTUEYUpb5Li2sdnmPTGgVobisKGfDB9tkRxhhJfkW29", "proofs": [ "4Y6WGrGuax1aYeBKnr2jHVboQmrvPXY76b6JfDugJxWe5M3BjRwS3uzwG4v8iJoenQYMiXE3ygQV2RjxMHSTJfDH" ], "script": "base64:AAIFAAAAAAAAAAsIAhIHCgUICAEBBAAAAAIAAAAACGtBc3NldElkAgAAAAdhc3NldElkAAAAAAdhc3NldElkCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAAIa0Fzc2V0SWQCAAAAGkNhbid0IHJlYWQgZmllbGQgJ2Fzc2V0SWQnAAAAAQAAAANpbnYBAAAABGluaXQAAAAFAAAABG5hbWUAAAALZGVzY3JpcHRpb24AAAAIcXVhbnRpdHkAAAAIZGVjaW1hbHMAAAAMaXNSZWlzc3VhYmxlAwkBAAAAAiE9AAAAAggFAAAAA2ludgAAAAZjYWxsZXIFAAAABHRoaXMJAAACAAAAAQIAAAArT25seSB0aGUgREFwcCBpdHNlbGYgY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgMEAAAACG5hbWVTaXplCQABMQAAAAEFAAAABG5hbWUDCQAAZgAAAAIAAAAAAAAAAAQFAAAACG5hbWVTaXplBgkAAGYAAAACBQAAAAhuYW1lU2l6ZQAAAAAAAAAAEAkAAAIAAAABAgAAAAxJbn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AAAAAAkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAACm5ld0Fzc2V0SWQAAAAAAAAAAAEFAAAAA25pbAUAAAADbmlsAAAAACSyOQQ=", "height": 1987299, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let kAssetId = "assetId" | |
5 | + | ||
6 | + | let assetId = valueOrErrorMessage(getString(this, kAssetId), "Can't read field 'assetId'") | |
7 | + | ||
8 | + | @Callable(inv) | |
9 | + | func init (name,description,quantity,decimals,isReissuable) = if ((inv.caller != this)) | |
10 | + | then throw("Only the DApp itself can call this function") | |
11 | + | else if ({ | |
12 | + | let nameSize = size(name) | |
13 | + | if ((4 > nameSize)) | |
14 | + | then true | |
15 | + | else (nameSize > 16) | |
16 | + | }) | |
17 | + | then throw("Invalid name") | |
18 | + | else if ({ | |
19 | + | let descrSize = size(description) | |
20 | + | if ((1 > descrSize)) | |
21 | + | then true | |
22 | + | else (descrSize > 1000) | |
23 | + | }) | |
24 | + | then throw("Invalid description") | |
25 | + | else if ((0 >= quantity)) | |
26 | + | then throw("Argument 'quantity' must be positive") | |
27 | + | else if (if ((0 > decimals)) | |
28 | + | then true | |
29 | + | else (decimals > 8)) | |
30 | + | then throw("Argument 'decimals' must be in [0..8]") | |
31 | + | else if (if (!(isDataStorageUntouched(this))) | |
32 | + | then true | |
33 | + | else isDefined(getString(this, kAssetId))) | |
34 | + | then throw("Can't init DApp because it's data storage was already modified") | |
35 | + | else { | |
36 | + | let issuableAsset = Issue(name, description, max([quantity, 1]), decimals, isReissuable) | |
37 | + | let newAssetId = calculateAssetId(issuableAsset) | |
38 | + | ([issuableAsset, StringEntry(kAssetId, toBase58String(newAssetId))] ++ (if ((quantity == 0)) | |
39 | + | then [Burn(newAssetId, 1)] | |
40 | + | else nil)) | |
41 | + | } | |
42 | + | ||
43 | + |
github/deemru/w8io/03bedc9 15.94 ms ◑![]()