tx · C8sYBtfqNvttRwE3xphfotNLAdQScTaAt2ThqRsjSGZk
3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb: -0.00100000 Waves
2023.03.05 00:13 [2475845] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves
{
"type": 13,
"id": "C8sYBtfqNvttRwE3xphfotNLAdQScTaAt2ThqRsjSGZk",
"fee": 100000,
"feeAssetId": null,
"timestamp": 1677964429055,
"version": 2,
"chainId": 84,
"sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb",
"senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK",
"proofs": [
"3XHqZg8NeEQUunxen7abfQb1AnhNHqHGukDDmbdsGBzrkxMp3aVVXL3RrVMSqssjyKMykmtopUEngpp4jvh6kVbb"
],
"script": "base64:BgIPCAISBQoDCAgIEgQKAggIBAAOY29sbGVjdGlvbk5hbWUJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMCDmNvbGxlY3Rpb25OYW1lAAZzeW1ib2wJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMCDmNvbGxlY3Rpb25OYW1lAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1MCkCBQR0aGlzAgt0b3RhbEFtb3VudAIBaQEEaW5pdAMOY29sbGVjdGlvbk5hbWUGc3ltYm9sC2Rlc2NyaXB0aW9uAwkAAAIIBQFpBmNhbGxlcgUEdGhpcwkAzAgCCQELU3RyaW5nRW50cnkCAg5jb2xsZWN0aW9uTmFtZQUOY29sbGVjdGlvbk5hbWUJAMwIAgkBC1N0cmluZ0VudHJ5AgIGc3ltYm9sBQZzeW1ib2wJAMwIAgkBC1N0cmluZ0VudHJ5AgILZGVzY3JpcHRpb24FC2Rlc2NyaXB0aW9uCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgt0b3RhbEFtb3VudAAABQNuaWwJAAIBAglvbmx5IGRBcHABaQEEbWludAICdG8IdG9rZW5VUkkDCQAAAggFAWkGY2FsbGVyBQR0aGlzBAd0b2tlbklkCQBkAgULdG90YWxBbW91bnQAAQQHcHJlTmFtZQkArAICCQCsAgIFBnN5bWJvbAIBIwkApAMBBQd0b2tlbklkBARuYW1lAwkAZgIJALECAQUHcHJlTmFtZQAQCQCkAwEFB3Rva2VuSWQFB3ByZU5hbWUEBWFzc2V0CQDDCAcFBG5hbWUFC2Rlc2NyaXB0aW9uAAEAAAcFBHVuaXQFBmhlaWdodAQHYXNzZXRJZAkAuAgBBQVhc3NldAQJdG9BZGRyZXNzCQEHQWRkcmVzcwEJANkEAQUCdG8JAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUJdG9BZGRyZXNzAAEFB2Fzc2V0SWQJAMwIAgkBDEludGVnZXJFbnRyeQICC3RvdGFsQW1vdW50BQd0b2tlbklkCQDMCAIJAQtTdHJpbmdFbnRyeQIFBG5hbWUFCHRva2VuVVJJBQNuaWwJAAIBAglvbmx5IGRBcHAAUDJM1A==",
"height": 2475845,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 2M8GBSTEThXss3wCgToCcdfeynAjL2Lda7SriUoAsUAY
Next: 2PUYpnv6jyUi3BHj3v5btGiaNqbTCET2P4a5Nd5SS1BQ
Diff:
Old | New | | Differences |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let collectionName = getStringValue(this, "collectionName") |
---|
| 5 | + | |
---|
| 6 | + | let symbol = getStringValue(this, "collectionName") |
---|
5 | 7 | | |
---|
6 | 8 | | let description = getStringValue(this, "description") |
---|
7 | 9 | | |
---|
8 | 10 | | let totalAmount = getIntegerValue(this, "totalAmount") |
---|
9 | 11 | | |
---|
10 | 12 | | @Callable(i) |
---|
11 | | - | func init (collectionName,description) = if ((i.caller == this)) |
---|
12 | | - | then [StringEntry("collectionName", collectionName), StringEntry("description", description), IntegerEntry("totalAmount", 0)] |
---|
| 13 | + | func init (collectionName,symbol,description) = if ((i.caller == this)) |
---|
| 14 | + | then [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)] |
---|
13 | 15 | | else throw("only dApp") |
---|
14 | 16 | | |
---|
15 | 17 | | |
---|
|
18 | 20 | | func mint (to,tokenURI) = if ((i.caller == this)) |
---|
19 | 21 | | then { |
---|
20 | 22 | | let tokenId = (totalAmount + 1) |
---|
21 | | - | let name = ((collectionName + "#") + toString(tokenId)) |
---|
| 23 | + | let preName = ((symbol + "#") + toString(tokenId)) |
---|
| 24 | + | let name = if ((size(preName) > 16)) |
---|
| 25 | + | then toString(tokenId) |
---|
| 26 | + | else preName |
---|
22 | 27 | | let asset = Issue(name, description, 1, 0, false, unit, height) |
---|
23 | 28 | | let assetId = calculateAssetId(asset) |
---|
24 | 29 | | let toAddress = Address(fromBase58String(to)) |
---|
Full:
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 | + | |
---|
| 6 | + | let symbol = getStringValue(this, "collectionName") |
---|
5 | 7 | | |
---|
6 | 8 | | let description = getStringValue(this, "description") |
---|
7 | 9 | | |
---|
8 | 10 | | let totalAmount = getIntegerValue(this, "totalAmount") |
---|
9 | 11 | | |
---|
10 | 12 | | @Callable(i) |
---|
11 | | - | func init (collectionName,description) = if ((i.caller == this)) |
---|
12 | | - | then [StringEntry("collectionName", collectionName), StringEntry("description", description), IntegerEntry("totalAmount", 0)] |
---|
| 13 | + | func init (collectionName,symbol,description) = if ((i.caller == this)) |
---|
| 14 | + | then [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)] |
---|
13 | 15 | | else throw("only dApp") |
---|
14 | 16 | | |
---|
15 | 17 | | |
---|
16 | 18 | | |
---|
17 | 19 | | @Callable(i) |
---|
18 | 20 | | func mint (to,tokenURI) = if ((i.caller == this)) |
---|
19 | 21 | | then { |
---|
20 | 22 | | let tokenId = (totalAmount + 1) |
---|
21 | | - | let name = ((collectionName + "#") + toString(tokenId)) |
---|
| 23 | + | let preName = ((symbol + "#") + toString(tokenId)) |
---|
| 24 | + | let name = if ((size(preName) > 16)) |
---|
| 25 | + | then toString(tokenId) |
---|
| 26 | + | else preName |
---|
22 | 27 | | let asset = Issue(name, description, 1, 0, false, unit, height) |
---|
23 | 28 | | let assetId = calculateAssetId(asset) |
---|
24 | 29 | | let toAddress = Address(fromBase58String(to)) |
---|
25 | 30 | | [ScriptTransfer(toAddress, 1, assetId), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)] |
---|
26 | 31 | | } |
---|
27 | 32 | | else throw("only dApp") |
---|
28 | 33 | | |
---|
29 | 34 | | |
---|