tx · 2PUYpnv6jyUi3BHj3v5btGiaNqbTCET2P4a5Nd5SS1BQ

3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb:  -0.00200000 Waves

2023.03.05 00:37 [2475870] smart account 3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb > SELF 0.00000000 Waves

{ "type": 13, "id": "2PUYpnv6jyUi3BHj3v5btGiaNqbTCET2P4a5Nd5SS1BQ", "fee": 200000, "feeAssetId": null, "timestamp": 1677965843103, "version": 2, "chainId": 84, "sender": "3MrQ4g9YCsAN2Wr4QUXiWAPhNPv7DGdQNWb", "senderPublicKey": "2VQGRNRWyFAZvjDtkgZwdZcTwZvBJJ61n8zJfYYxm5eK", "proofs": [ "mW66Px1WoJQ1ZjPYN3gzjDazvPYzn4MZ4hVU3MhaEGDMJHaP1emnysp3kTx4jJ3c1eK5UDskWzXig7ixuCRTr1y" ], "script": "base64:BgIPCAISBQoDCAgIEgQKAggIBQAOY29sbGVjdGlvbk5hbWUJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMCDmNvbGxlY3Rpb25OYW1lAAZzeW1ib2wJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMCDmNvbGxlY3Rpb25OYW1lAAtkZXNjcmlwdGlvbgkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwILZGVzY3JpcHRpb24AC3RvdGFsQW1vdW50CQERQGV4dHJOYXRpdmUoMTA1MCkCBQR0aGlzAgt0b3RhbEFtb3VudAENdHJhbnNmZXJPck5vdAICdG8HYXNzZXRJZAMJAAACBQJ0bwUEdGhpcwcJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUCdG8AAQUHYXNzZXRJZAUDbmlsAgFpAQRpbml0Aw5jb2xsZWN0aW9uTmFtZQZzeW1ib2wLZGVzY3JpcHRpb24DCQAAAggFAWkGY2FsbGVyBQR0aGlzCQDMCAIJAQtTdHJpbmdFbnRyeQICDmNvbGxlY3Rpb25OYW1lBQ5jb2xsZWN0aW9uTmFtZQkAzAgCCQELU3RyaW5nRW50cnkCAgZzeW1ib2wFBnN5bWJvbAkAzAgCCQELU3RyaW5nRW50cnkCAgtkZXNjcmlwdGlvbgULZGVzY3JpcHRpb24JAMwIAgkBDEludGVnZXJFbnRyeQICC3RvdGFsQW1vdW50AAAFA25pbAkAAgECCW9ubHkgZEFwcAFpAQRtaW50AgJ0bwh0b2tlblVSSQMJAAACCAUBaQZjYWxsZXIFBHRoaXMEB3Rva2VuSWQJAGQCBQt0b3RhbEFtb3VudAABBAdwcmVOYW1lCQCsAgIJAKwCAgUGc3ltYm9sAgEjCQCkAwEFB3Rva2VuSWQEBG5hbWUDCQBmAgkAsQIBBQdwcmVOYW1lABAJAKQDAQUHdG9rZW5JZAUHcHJlTmFtZQQFYXNzZXQJAMMIBwUEbmFtZQULZGVzY3JpcHRpb24AAQAABwUEdW5pdAUGaGVpZ2h0BAdhc3NldElkCQC4CAEFBWFzc2V0BAl0b0FkZHJlc3MJAQdBZGRyZXNzAQkA2QQBBQJ0bwkAzAgCAwkAAAIFCXRvQWRkcmVzcwUEdGhpcwkBDlNjcmlwdFRyYW5zZmVyAwUJdG9BZGRyZXNzAAAFB2Fzc2V0SWQJAQ5TY3JpcHRUcmFuc2ZlcgMFCXRvQWRkcmVzcwABBQdhc3NldElkCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgt0b3RhbEFtb3VudAUHdG9rZW5JZAkAzAgCCQELU3RyaW5nRW50cnkCBQRuYW1lBQh0b2tlblVSSQUDbmlsCQACAQIJb25seSBkQXBwADhsYyo=", "height": 2475870, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C8sYBtfqNvttRwE3xphfotNLAdQScTaAt2ThqRsjSGZk Next: EW8FKQzPSEzC4ZykyHADcve2Sk3CjxzuXYKfDBdLPPYn Diff:
OldNewDifferences
88 let description = getStringValue(this, "description")
99
1010 let totalAmount = getIntegerValue(this, "totalAmount")
11+
12+func transferOrNot (to,assetId) = if ((to == this))
13+ then false
14+ else [ScriptTransfer(to, 1, assetId)]
15+
1116
1217 @Callable(i)
1318 func init (collectionName,symbol,description) = if ((i.caller == this))
2732 let asset = Issue(name, description, 1, 0, false, unit, height)
2833 let assetId = calculateAssetId(asset)
2934 let toAddress = Address(fromBase58String(to))
30-[ScriptTransfer(toAddress, 1, assetId), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
35+[if ((toAddress == this))
36+ then ScriptTransfer(toAddress, 0, assetId)
37+ else ScriptTransfer(toAddress, 1, assetId), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
3138 }
3239 else throw("only dApp")
3340
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let collectionName = getStringValue(this, "collectionName")
55
66 let symbol = getStringValue(this, "collectionName")
77
88 let description = getStringValue(this, "description")
99
1010 let totalAmount = getIntegerValue(this, "totalAmount")
11+
12+func transferOrNot (to,assetId) = if ((to == this))
13+ then false
14+ else [ScriptTransfer(to, 1, assetId)]
15+
1116
1217 @Callable(i)
1318 func init (collectionName,symbol,description) = if ((i.caller == this))
1419 then [StringEntry("collectionName", collectionName), StringEntry("symbol", symbol), StringEntry("description", description), IntegerEntry("totalAmount", 0)]
1520 else throw("only dApp")
1621
1722
1823
1924 @Callable(i)
2025 func mint (to,tokenURI) = if ((i.caller == this))
2126 then {
2227 let tokenId = (totalAmount + 1)
2328 let preName = ((symbol + "#") + toString(tokenId))
2429 let name = if ((size(preName) > 16))
2530 then toString(tokenId)
2631 else preName
2732 let asset = Issue(name, description, 1, 0, false, unit, height)
2833 let assetId = calculateAssetId(asset)
2934 let toAddress = Address(fromBase58String(to))
30-[ScriptTransfer(toAddress, 1, assetId), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
35+[if ((toAddress == this))
36+ then ScriptTransfer(toAddress, 0, assetId)
37+ else ScriptTransfer(toAddress, 1, assetId), IntegerEntry("totalAmount", tokenId), StringEntry(name, tokenURI)]
3138 }
3239 else throw("only dApp")
3340
3441

github/deemru/w8io/169f3d6 
39.72 ms