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:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let collectionName = getStringValue(this, "collectionName")
5+
6+let symbol = getStringValue(this, "collectionName")
57
68 let description = getStringValue(this, "description")
79
810 let totalAmount = getIntegerValue(this, "totalAmount")
911
1012 @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)]
1315 else throw("only dApp")
1416
1517
1820 func mint (to,tokenURI) = if ((i.caller == this))
1921 then {
2022 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
2227 let asset = Issue(name, description, 1, 0, false, unit, height)
2328 let assetId = calculateAssetId(asset)
2429 let toAddress = Address(fromBase58String(to))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let collectionName = getStringValue(this, "collectionName")
5+
6+let symbol = getStringValue(this, "collectionName")
57
68 let description = getStringValue(this, "description")
79
810 let totalAmount = getIntegerValue(this, "totalAmount")
911
1012 @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)]
1315 else throw("only dApp")
1416
1517
1618
1719 @Callable(i)
1820 func mint (to,tokenURI) = if ((i.caller == this))
1921 then {
2022 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
2227 let asset = Issue(name, description, 1, 0, false, unit, height)
2328 let assetId = calculateAssetId(asset)
2429 let toAddress = Address(fromBase58String(to))
2530 [ScriptTransfer(toAddress, 1, assetId), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
2631 }
2732 else throw("only dApp")
2833
2934

github/deemru/w8io/169f3d6 
26.47 ms