tx · 5e7c15hGuZsdghGiAQoJUFtM1ZqRvFa78adKnMEkPaZ9 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb: -0.00100000 Waves 2023.03.04 23:52 [2475817] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves
{ "type": 13, "id": "5e7c15hGuZsdghGiAQoJUFtM1ZqRvFa78adKnMEkPaZ9", "fee": 100000, "feeAssetId": null, "timestamp": 1677963133094, "version": 2, "chainId": 84, "sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb", "senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK", "proofs": [ "5CdmumGFvJp4nB48Q2rB3Ayeh3We9mtMdiZy8jSeECWJQUBS19RbQWuiKsDSERo3LbR2iCrk4KXTMfbQM6gcwENy" ], "script": "base64:BgIOCAISBAoCCAgSBAoCAggDAA5jb2xsZWN0aW9uTmFtZQkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwIOY29sbGVjdGlvbk5hbWUAC2Rlc2NyaXB0aW9uCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzAgtkZXNjcmlwdGlvbgALdG90YWxBbW91bnQJARFAZXh0ck5hdGl2ZSgxMDUwKQIFBHRoaXMCC3RvdGFsQW1vdW50AgFpAQRpbml0Ag5jb2xsZWN0aW9uTmFtZQtkZXNjcmlwdGlvbgMJAAACCAUBaQZjYWxsZXIFBHRoaXMJAMwIAgkBC1N0cmluZ0VudHJ5AgIOY29sbGVjdGlvbk5hbWUFDmNvbGxlY3Rpb25OYW1lCQDMCAIJAQtTdHJpbmdFbnRyeQICC2Rlc2NyaXB0aW9uBQtkZXNjcmlwdGlvbgkAzAgCCQEMSW50ZWdlckVudHJ5AgILdG90YWxBbW91bnQAAAUDbmlsCQACAQIJb25seSBkQXBwAWkBBG1pbnQCAnRvCHRva2VuVVJJAwkAAAIIBQFpBmNhbGxlcgUEdGhpcwQHdG9rZW5JZAkAZAIFC3RvdGFsQW1vdW50AAEEBG5hbWUJAKwCAgkArAICBQ5jb2xsZWN0aW9uTmFtZQIBIwkApAMBBQd0b2tlbklkBAVhc3NldAkAwwgHBQRuYW1lBQtkZXNjcmlwdGlvbgABAAAHBQR1bml0BQZoZWlnaHQEB2Fzc2V0SWQJALgIAQUFYXNzZXQECXRvQWRkcmVzcwkApwgBBQJ0bwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQl0b0FkZHJlc3MAAQUHYXNzZXRJZAkAzAgCCQEMSW50ZWdlckVudHJ5AgILdG90YWxBbW91bnQFB3Rva2VuSWQJAMwIAgkBC1N0cmluZ0VudHJ5AgUEbmFtZQUIdG9rZW5VUkkFA25pbAkAAgECCW9ubHkgZEFwcAAasYkM", "height": 2475817, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Y1Fm1rKuAqP3JevgboeVX8ysoXdiqoLj5NYX4bWVBnK Next: HRQLv2DZ5TwWczCYZwpjV5TLxqr8DV3DEFCuKXE7DFS5 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let collectionName = getStringValue(this, "collectionName") | |
4 | 5 | ||
6 | + | let description = getStringValue(this, "description") | |
7 | + | ||
8 | + | let totalAmount = getIntegerValue(this, "totalAmount") | |
5 | 9 | ||
6 | 10 | @Callable(i) | |
7 | - | func mint (assetId,amount) = $Tuple2([Reissue(assetId, amount, true)], unit) | |
11 | + | func init (collectionName,description) = if ((i.caller == this)) | |
12 | + | then [StringEntry("collectionName", collectionName), StringEntry("description", description), IntegerEntry("totalAmount", 0)] | |
13 | + | else throw("only dApp") | |
8 | 14 | ||
9 | 15 | ||
10 | 16 | ||
11 | 17 | @Callable(i) | |
12 | - | func burn (assetId,amount) = $Tuple2([Burn(assetId, amount)], unit) | |
18 | + | func mint (to,tokenURI) = if ((i.caller == this)) | |
19 | + | then { | |
20 | + | let tokenId = (totalAmount + 1) | |
21 | + | let name = ((collectionName + "#") + toString(tokenId)) | |
22 | + | let asset = Issue(name, description, 1, 0, false, unit, height) | |
23 | + | let assetId = calculateAssetId(asset) | |
24 | + | let toAddress = addressFromPublicKey(to) | |
25 | + | [ScriptTransfer(toAddress, 1, assetId), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)] | |
26 | + | } | |
27 | + | else throw("only dApp") | |
13 | 28 | ||
14 | 29 |
github/deemru/w8io/026f985 48.49 ms ◑