tx · 28MJT6YfxEK8kCEQ5HbuKoUcCQUMQAeqieXtsDRfMan1

3NCExv7CGM9nMXcyQKdG4aQipovTdcTTY88:  -0.01000000 Waves

2022.03.31 02:22 [1987311] smart account 3NCExv7CGM9nMXcyQKdG4aQipovTdcTTY88 > SELF 0.00000000 Waves

{ "type": 13, "id": "28MJT6YfxEK8kCEQ5HbuKoUcCQUMQAeqieXtsDRfMan1", "fee": 1000000, "feeAssetId": null, "timestamp": 1648682615711, "version": 2, "chainId": 84, "sender": "3NCExv7CGM9nMXcyQKdG4aQipovTdcTTY88", "senderPublicKey": "BJN6L4XiVENKnnJhbFFTDrnXpD14V8fz7mFvYD9tPCBW", "proofs": [ "vJ4PCLd5Xwfamj3MzUviHUjFcQWHBHBEpbaScqVWUFrf36d7vgGU3qPzpQ36kzPsJ8TAK81Z1b4UizBV1JyHb5y" ], "script": "base64:AAIFAAAAAAAAAAsIAhIHCgUICAEBBAAAAAIAAAAACGtBc3NldElkAgAAAAdhc3NldElkAAAAAAdhc3NldElkCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAAIa0Fzc2V0SWQCAAAAGkNhbid0IHJlYWQgZmllbGQgJ2Fzc2V0SWQnAAAAAQAAAANpbnYBAAAABGluaXQAAAAFAAAABG5hbWUAAAALZGVzY3JpcHRpb24AAAAIcXVhbnRpdHkAAAAIZGVjaW1hbHMAAAAMaXNSZWlzc3VhYmxlAwkBAAAAAiE9AAAAAggFAAAAA2ludgAAAAZjYWxsZXIFAAAABHRoaXMJAAACAAAAAQIAAAArT25seSB0aGUgREFwcCBpdHNlbGYgY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgMEAAAACG5hbWVTaXplCQABMQAAAAEFAAAABG5hbWUDCQAAZgAAAAIAAAAAAAAAAAQFAAAACG5hbWVTaXplBgkAAGYAAAACBQAAAAhuYW1lU2l6ZQAAAAAAAAAAEAkAAAIAAAABAgAAAAxJbnZhbGlkIG5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wAAAACCQEAAAAEQnVybgAAAAIFAAAACm5ld0Fzc2V0SWQAAAAAAAAAAAEFAAAAA25pbAUAAAADbmlsAAAAAOarJOs=", "height": 1987311, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
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/169f3d6 
18.53 ms