tx · 6Qv4iWKXgWXR9Y51btDWgvHPLKJfDf5U8Dvja2m5rAmv

3N2Fq3xoRamZ62SFkonL1kcSs9womjpF7KQ:  -0.01400000 Waves

2022.07.04 20:05 [2125207] smart account 3N2Fq3xoRamZ62SFkonL1kcSs9womjpF7KQ > SELF 0.00000000 Waves

{ "type": 13, "id": "6Qv4iWKXgWXR9Y51btDWgvHPLKJfDf5U8Dvja2m5rAmv", "fee": 1400000, "feeAssetId": null, "timestamp": 1656954354486, "version": 2, "chainId": 84, "sender": "3N2Fq3xoRamZ62SFkonL1kcSs9womjpF7KQ", "senderPublicKey": "9s1gudEMHm746dNqnAUyThSzsf5cNdcNTuBE1ABNtZ5C", "proofs": [ "5cnBdJuYP8XCagi5Vi67833f3E3cN9YgmLfkfJgTzCbRpNnkL1JwjDs6eHocoe57mHi3DZh51AYFYVMhs6EMzWih" ], "script": "base64:AAIFAAAAAAAAAAwIAhIGCgQICAgIEgAAAAADAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAABAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAABAAAACGNoZWNrTkZUAAAAAQAAAAVhc3NldAMDAwkAAAAAAAACCAgFAAAABWFzc2V0AAAABmlzc3VlcgAAAAVieXRlcwgFAAAABHRoaXMAAAAFYnl0ZXMJAAAAAAAAAggFAAAABWFzc2V0AAAACGRlY2ltYWxzAAAAAAAAAAAABwkAAAAAAAACCAUAAAAFYXNzZXQAAAAKcmVpc3N1YWJsZQcHCQAA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AAgkAASwAAAACCQABLAAAAAICAAAAC2NvbGxlY3Rpb25fBQAAABBjb2xsZWN0aW9uRG9tYWluAgAAAAVfc2l6ZQkAAGUAAAACBQAAAAZuZnROdW0AAAAAAAAAAAEJAARMAAAAAgUAAAAQdXBkYXRlQ29sbGVjdGlvbgkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAB2Fzc2V0SWQAAAAAAAAAAAEJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACCQABLAAAAAICAAAABG5mdF8FAAAACmFzc2V0SWRTdHICAAAABV9kYXRhCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgkAASwAAAACAgAAAARuZnRfBQAAAAphc3NldElkU3RyAgAAAAZfaW1hZ2UJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACCQABLAAAAAICAAAABG5mdF8FAAAACmFzc2V0SWRTdHICAAAAB19pc3N1ZXIJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAALY29sbGVjdGlvbl8FAAAAEGNvbGxlY3Rpb25Eb21haW4CAAAACV9hc3NldElkXwUAAAAKYXNzZXRJZFN0cgUAAAADbmlsCQAAAgAAAAECAAAAFkl2YWxpZCBjb2xsZWN0aW9uIG5hbWUJAAACAAAAAQIAAAATSXZhbGlkIE5GVCBhdHRhY2hlZAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5kMulUw==", "height": 2125207, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5UfWwd8UygKEG7SE9xGzvhHU4jGWCSLWMm1Jr21p16Zp Next: none Diff:
OldNewDifferences
2727
2828
2929 @Callable(i)
30-func createNFT (nftName,nftDesc,image,collectionName) = if ((toString(i.caller) == "3MuocfPorcMAUnSc35WpLgUKFQJKm6RC55Z"))
30+func createNFT (nftName,nftDesc,image,collectionName) = if ((toString(i.caller) == "3MuocfPorcMAUnSc35WpLgUKFQJKm611111"))
3131 then throw("issuance of new NFTs is limited")
3232 else if ((indexOf(image, "https://") != 0))
3333 then throw("https link to image required")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func tryGetInteger (key) = match getInteger(this, key) {
55 case b: Int =>
66 b
77 case _ =>
88 0
99 }
1010
1111
1212 func tryGetString (key) = match getString(this, key) {
1313 case b: String =>
1414 b
1515 case _ =>
1616 ""
1717 }
1818
1919
2020 func checkNFT (asset) = if (if (if ((asset.issuer.bytes == this.bytes))
2121 then (asset.decimals == 0)
2222 else false)
2323 then (asset.reissuable == false)
2424 else false)
2525 then (asset.quantity == 1)
2626 else false
2727
2828
2929 @Callable(i)
30-func createNFT (nftName,nftDesc,image,collectionName) = if ((toString(i.caller) == "3MuocfPorcMAUnSc35WpLgUKFQJKm6RC55Z"))
30+func createNFT (nftName,nftDesc,image,collectionName) = if ((toString(i.caller) == "3MuocfPorcMAUnSc35WpLgUKFQJKm611111"))
3131 then throw("issuance of new NFTs is limited")
3232 else if ((indexOf(image, "https://") != 0))
3333 then throw("https link to image required")
3434 else {
3535 let asset = Issue(nftName, nftDesc, 1, 0, false, unit, 0)
3636 let assetId = calculateAssetId(asset)
3737 let assetIdStr = toBase58String(assetId)
3838 let collectionDomain = ((toString(i.caller) + "_") + (if ((size(collectionName) > 0))
3939 then collectionName
4040 else "basic"))
4141 let nftNum = (tryGetInteger((("collection_" + collectionDomain) + "_size")) + 1)
4242 $Tuple2([StringEntry((("nft_" + assetIdStr) + "_data"), (((("{'collection': '" + collectionDomain) + "', 'num': ") + toString(nftNum)) + "}")), StringEntry((("nft_" + assetIdStr) + "_image"), image), StringEntry((("nft_" + assetIdStr) + "_issuer"), toString(i.caller)), IntegerEntry((("collection_" + collectionDomain) + "_size"), nftNum), StringEntry(((("collection_" + collectionDomain) + "_assetId_") + assetIdStr), assetIdStr), asset, ScriptTransfer(i.caller, 1, assetId)], assetIdStr)
4343 }
4444
4545
4646
4747 @Callable(i)
4848 func burnNFT () = {
4949 let assetId = value(value(i.payments[0]).assetId)
5050 let asset = value(assetInfo(assetId))
5151 if (if ((value(i.payments[0]).amount == 1))
5252 then checkNFT(asset)
5353 else false)
5454 then {
5555 let assetIdStr = toBase58String(assetId)
5656 let issuer = tryGetString((("nft_" + assetIdStr) + "_issuer"))
5757 let data = tryGetString((("nft_" + assetIdStr) + "_data"))
5858 let partsData = split(data, ", ")
5959 let partsCollection = split(partsData[0], ": ")
6060 let collectionDomain = dropRight(drop(partsCollection[1], 1), 1)
6161 let nftNum = tryGetInteger((("collection_" + collectionDomain) + "_size"))
6262 if ((nftNum > 0))
6363 then {
6464 let updateCollection = if ((nftNum == 1))
6565 then DeleteEntry((("collection_" + collectionDomain) + "_size"))
6666 else IntegerEntry((("collection_" + collectionDomain) + "_size"), (nftNum - 1))
6767 [updateCollection, Burn(assetId, 1), DeleteEntry((("nft_" + assetIdStr) + "_data")), DeleteEntry((("nft_" + assetIdStr) + "_image")), DeleteEntry((("nft_" + assetIdStr) + "_issuer")), DeleteEntry(((("collection_" + collectionDomain) + "_assetId_") + assetIdStr))]
6868 }
6969 else throw("Ivalid collection name")
7070 }
7171 else throw("Ivalid NFT attached")
7272 }
7373
7474
7575 @Verifier(tx)
7676 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
7777

github/deemru/w8io/026f985 
22.76 ms