tx · 9hWny2C9WsjYgjmijcT2S1UhwuHxkVUU7up9C4Sgt4oh 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb: -0.00200000 Waves 2023.03.05 00:59 [2475893] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves
{ "type": 13, "id": "9hWny2C9WsjYgjmijcT2S1UhwuHxkVUU7up9C4Sgt4oh", "fee": 200000, "feeAssetId": null, "timestamp": 1677967172545, "version": 2, "chainId": 84, "sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb", "senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK", "proofs": [ "5vE1PGLwn2mRfTPmabFArorgGvZb9aESJQLNTTPix7HRhywdhzULxshrZUVXJuNQq6b5Hx6AJt2HR9ZbwZS4LptM" ], "script": "base64:BgIPCAISBQoDCAgIEgQKAggIBQAOY29sbGVjdGlvbk5hbWUJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMCDmNvbGxlY3Rpb25OYW1lAAZzeW1ib2wJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMCBnN5bWJvbAALZGVzY3JpcHRpb24JARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMCC2Rlc2NyaXB0aW9uAAt0b3RhbEFtb3VudAkBEUBleHRyTmF0aXZlKDEwNTApAgUEdGhpcwILdG90YWxBbW91bnQBDXRyYW5zZmVyT3JOb3QCAnRvB2Fzc2V0SWQDCQAAAgUCdG8FBHRoaXMJAQtTdHJpbmdFbnRyeQICAAIACQEOU2NyaXB0VHJhbnNmZXIDBQJ0bwABBQdhc3NldElkAgFpAQRpbml0Aw5jb2xsZWN0aW9uTmFtZQZzeW1ib2wLZGVzY3JpcHRpb24DCQAAAggFAWkGY2FsbGVyBQR0aGlzCQDMCAIJAQtTdHJpbmdFbnRyeQICDmNvbGxlY3Rpb25OYW1lBQ5jb2xsZWN0aW9uTmFtZQkAzAgCCQELU3RyaW5nRW50cnkCAgZzeW1ib2wFBnN5bWJvbAkAzAgCCQELU3RyaW5nRW50cnkCAgtkZXNjcmlwdGlvbgULZGVzY3JpcHRpb24JAMwIAgkBDEludGVnZXJFbnRyeQICC3RvdGFsQW1vdW50AAAFA25pbAkAAgECCW9ubHkgZEFwcAFpAQRtaW50AgJ0bwh0b2tlblVSSQMJAAACCAUBaQZjYWxsZXIFBHRoaXMEB3Rva2VuSWQJAGQCBQt0b3RhbEFtb3VudAABBAdwcmVOYW1lCQCsAgIJAKwCAgUGc3ltYm9sAgEtCQCkAwEFB3Rva2VuSWQEBG5hbWUDCQBmAgkAsQIBBQdwcmVOYW1lABAFB3ByZU5hbWUJAKQDAQUHdG9rZW5JZAQFYXNzZXQJAMMIBwUEbmFtZQULZGVzY3JpcHRpb24AAQAABwUEdW5pdAUGaGVpZ2h0BAdhc3NldElkCQC4CAEFBWFzc2V0BAl0b0FkZHJlc3MJAQdBZGRyZXNzAQkA2QQBBQJ0bwQIdHJhbnNmZXIJAQ10cmFuc2Zlck9yTm90AgUJdG9BZGRyZXNzBQdhc3NldElkAwkAAAIFCHRyYW5zZmVyBQh0cmFuc2ZlcgkAzAgCBQVhc3NldAkAzAgCBQh0cmFuc2ZlcgkAzAgCCQEMSW50ZWdlckVudHJ5AgILdG90YWxBbW91bnQFB3Rva2VuSWQJAMwIAgkBC1N0cmluZ0VudHJ5AgUEbmFtZQUIdG9rZW5VUkkFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECCW9ubHkgZEFwcABP4JIb", "height": 2475893, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ag6N2TAFL6k7p9xrPVjWTP17CgwyzgGw8TxmEUmJ4MDX Next: CEo7CHjkmf2NViY8wHFKwkrxv2vzkd2tT854vzH1Jt13 Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let collectionName = getStringValue(this, "collectionName") | |
5 | 5 | ||
6 | - | let symbol = getStringValue(this, " | |
6 | + | let symbol = getStringValue(this, "symbol") | |
7 | 7 | ||
8 | 8 | let description = getStringValue(this, "description") | |
9 | 9 | ||
25 | 25 | func mint (to,tokenURI) = if ((i.caller == this)) | |
26 | 26 | then { | |
27 | 27 | let tokenId = (totalAmount + 1) | |
28 | - | let name = ((symbol + "-") + toString(tokenId)) | |
29 | - | [StringEntry("name", name), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)] | |
28 | + | let preName = ((symbol + "-") + toString(tokenId)) | |
29 | + | let name = if ((size(preName) > 16)) | |
30 | + | then preName | |
31 | + | else toString(tokenId) | |
32 | + | let asset = Issue(name, description, 1, 0, false, unit, height) | |
33 | + | let assetId = calculateAssetId(asset) | |
34 | + | let toAddress = Address(fromBase58String(to)) | |
35 | + | let transfer = transferOrNot(toAddress, assetId) | |
36 | + | if ((transfer == transfer)) | |
37 | + | then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)] | |
38 | + | else throw("Strict value is not equal to itself.") | |
30 | 39 | } | |
31 | 40 | else throw("only dApp") | |
32 | 41 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let collectionName = getStringValue(this, "collectionName") | |
5 | 5 | ||
6 | - | let symbol = getStringValue(this, " | |
6 | + | let symbol = getStringValue(this, "symbol") | |
7 | 7 | ||
8 | 8 | let description = getStringValue(this, "description") | |
9 | 9 | ||
10 | 10 | let totalAmount = getIntegerValue(this, "totalAmount") | |
11 | 11 | ||
12 | 12 | func transferOrNot (to,assetId) = if ((to == this)) | |
13 | 13 | then StringEntry("", "") | |
14 | 14 | else ScriptTransfer(to, 1, assetId) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(i) | |
18 | 18 | func init (collectionName,symbol,description) = if ((i.caller == this)) | |
19 | 19 | then [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)] | |
20 | 20 | else throw("only dApp") | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
24 | 24 | @Callable(i) | |
25 | 25 | func mint (to,tokenURI) = if ((i.caller == this)) | |
26 | 26 | then { | |
27 | 27 | let tokenId = (totalAmount + 1) | |
28 | - | let name = ((symbol + "-") + toString(tokenId)) | |
29 | - | [StringEntry("name", name), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)] | |
28 | + | let preName = ((symbol + "-") + toString(tokenId)) | |
29 | + | let name = if ((size(preName) > 16)) | |
30 | + | then preName | |
31 | + | else toString(tokenId) | |
32 | + | let asset = Issue(name, description, 1, 0, false, unit, height) | |
33 | + | let assetId = calculateAssetId(asset) | |
34 | + | let toAddress = Address(fromBase58String(to)) | |
35 | + | let transfer = transferOrNot(toAddress, assetId) | |
36 | + | if ((transfer == transfer)) | |
37 | + | then [asset, transfer, IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)] | |
38 | + | else throw("Strict value is not equal to itself.") | |
30 | 39 | } | |
31 | 40 | else throw("only dApp") | |
32 | 41 | ||
33 | 42 |
github/deemru/w8io/026f985 28.78 ms ◑