tx · EXkyNRLu4QFJGQGi6d4aoLoaBrrhThyRJiZz5aKH6e4W

3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz:  -0.01400000 Waves

2022.10.30 15:38 [2295148] smart account 3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz > SELF 0.00000000 Waves

{ "type": 13, "id": "EXkyNRLu4QFJGQGi6d4aoLoaBrrhThyRJiZz5aKH6e4W", "fee": 1400000, "feeAssetId": null, "timestamp": 1667133555464, "version": 2, "chainId": 84, "sender": "3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz", "senderPublicKey": "AmNGcQhk77jcLZEVysQPbYbF3QCHAzQH9Zc9oRZB963h", "proofs": [ "64dfPHcMgPCY5SFWUM34xMce6MxKt2871MqF17xXk6M627bgBBEiz3RZq8veBRjDhCwePSb8cmoqJykh5tDQ4jum" ], "script": "base64:AAIFAAAAAAAAAAkIAhIFCgMICAgAAAAAAAAAAQAAAAFpAQAAAA5Jc3N1ZU5GVFNlcmllcwAAAAMAAAAOTkZURGVzY3JpcHRpb24AAAAISVBGU0hhc2gAAAAIQ2F0ZWdvcnkEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANTkZUU2VyaWVzTmFtZQIAAAAGQTRBREFPBAAAABBnZXRTZXJpZXNDb3VudGVyBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMCAAAAB0NvdW50ZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAUQ3VycmVudFNlcmllc0NvdW50ZXIJAABkAAAAAgUAAAAQZ2V0U2VyaWVzQ291bnRlcgAAAAAAAAAAAQQAAAAFYXNzZXQJAARDAAAABwkAASwAAAACCQABLAAAAAIFAAAADU5GVFNlcmllc05hbWUCAAAAAS0JAAGkAAAAAQUAAAAUQ3VycmVudFNlcmllc0NvdW50ZXIFAAAADk5GVERlc2NyaXB0aW9uAAAAAAAAAAABAAAAAAAAAAAABwUAAAAEdW5pdAAAAAAAAAAAAAQAAAAHYXNzZXRJZAkABDgAAAABBQAAAAVhc3NldAkABEwAAAACBQAAAAVhc3NldAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAHQ291bnRlcgUAAAAUQ3VycmVudFNlcmllc0NvdW50ZXIJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAKVGltZXN0YW1wXwUAAAAISVBGU0hhc2gIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAACElQRlNIYXNoBQAAAApjdXJyZW50S2V5CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgIAAAAFTGlua18FAAAACElQRlNIYXNoCQABLAAAAAICAAAALmh0dHBzOi8vYXBpLmlwZnNicm93c2VyLmNvbS9pcGZzL2dldC5waHA/aGFzaD0FAAAACElQRlNIYXNoCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmulwh/", "height": 2295148, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Bi5AtqzMHNacaLhU3zHx21yceJTVu8c5zGi3nYRAyZvh Next: Gh72Ls16LUkUAtDWwLM5xieXgNRXEp5Ra5CH5bfsNvNa Diff:
OldNewDifferences
44
55
66 @Callable(i)
7-func RegisterNFTSeries (NFTSeriesName,NFTDescription,SeriesStartCounter,SeriesEndCounter) = {
7+func IssueNFTSeries (NFTDescription,IPFSHash,Category) = {
88 let currentKey = toBase58String(i.caller.bytes)
9- let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName))
10- if ((checkseries == NFTSeriesName))
11- then throw("Series Name Already Exist. Choose Another Series Name.")
12- else if ((SeriesStartCounter > SeriesEndCounter))
13- then throw("End Counter must be greater than Start Counter.")
14- else [StringEntry(("NFTSeriesName_" + NFTSeriesName), NFTSeriesName), StringEntry(("NFTDescription_" + NFTSeriesName), NFTDescription), StringEntry(("SeriesIssuerPubkey_" + NFTSeriesName), currentKey), IntegerEntry(("SeriesStartCounter_" + NFTSeriesName), SeriesStartCounter), IntegerEntry(("SeriesEndCounter_" + NFTSeriesName), SeriesEndCounter), IntegerEntry(("SeriesCurrentCounter_" + NFTSeriesName), 0)]
9+ let NFTSeriesName = "A4ADAO"
10+ let getSeriesCounter = match getInteger(this, "Counter") {
11+ case a: Int =>
12+ a
13+ case _ =>
14+ 0
1515 }
16-
17-
18-
19-@Callable(i)
20-func IssueNFTSeries (NFTSeriesName) = {
21- let currentKey = toBase58String(i.caller.bytes)
22- let getSeriesStartCounter = getIntegerValue(this, ("SeriesStartCounter_" + NFTSeriesName))
23- let getSeriesEndCounter = getIntegerValue(this, ("SeriesEndCounter_" + NFTSeriesName))
24- let getSeriesCurrentCounter = getIntegerValue(this, ("SeriesCurrentCounter_" + NFTSeriesName))
25- let getSeriesNewCounter = (getSeriesCurrentCounter + 1)
26- let asset = Issue(((NFTSeriesName + "-") + toString(getSeriesNewCounter)), getStringValue(this, ("NFTDescription_" + NFTSeriesName)), 1, 0, false, unit, 0)
16+ let CurrentSeriesCounter = (getSeriesCounter + 1)
17+ let asset = Issue(((NFTSeriesName + "-") + toString(CurrentSeriesCounter)), NFTDescription, 1, 0, false, unit, 0)
2718 let assetId = calculateAssetId(asset)
28- let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName))
29- let checkseriesissuerpubkey = getStringValue(this, ("SeriesIssuerPubkey_" + NFTSeriesName))
30- if ((checkseriesissuerpubkey != currentKey))
31- then throw(((("I know You are not An Admin. Only " + checkseriesissuerpubkey) + " has rights to issue NFT. But You are ") + currentKey))
32- else if ((getSeriesNewCounter > getSeriesEndCounter))
33- then throw((("Counter to Mint " + NFTSeriesName) + " is Finished. Create a New Series Please."))
34- else if ((checkseries == NFTSeriesName))
35- then [asset, IntegerEntry(("SeriesStartCounter_" + NFTSeriesName), getSeriesStartCounter), IntegerEntry(("SeriesEndCounter_" + NFTSeriesName), getSeriesEndCounter), IntegerEntry(("SeriesCurrentCounter_" + NFTSeriesName), getSeriesNewCounter), ScriptTransfer(i.caller, 1, assetId)]
36- else throw("Name Not Found.")
37- }
38-
39-
40-
41-@Callable(i)
42-func UploadNFTSeriesImg (NFTSeriesName,NFTSeriesImg) = {
43- let currentKey = toBase58String(i.caller.bytes)
44- let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName))
45- let checkseriesissuerpubkey = getStringValue(this, ("SeriesIssuerPubkey_" + NFTSeriesName))
46- if ((size(NFTSeriesImg) > 150000))
47- then throw("NFT Image Size can't Exceed 150kb as of now.")
48- else if ((checkseriesissuerpubkey != currentKey))
49- then throw(((("I know You are not An Admin. Only " + checkseriesissuerpubkey) + " has rights to issue NFT. But You are ") + currentKey))
50- else if ((checkseries == NFTSeriesName))
51- then [StringEntry(("Image_" + NFTSeriesName), NFTSeriesImg)]
52- else throw("Name Not Found.")
19+[asset, IntegerEntry("Counter", CurrentSeriesCounter), IntegerEntry(("Timestamp_" + IPFSHash), lastBlock.timestamp), StringEntry(IPFSHash, currentKey), StringEntry(("Link_" + IPFSHash), ("https://api.ipfsbrowser.com/ipfs/get.php?hash=" + IPFSHash)), ScriptTransfer(i.caller, 1, assetId)]
5320 }
5421
5522
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func RegisterNFTSeries (NFTSeriesName,NFTDescription,SeriesStartCounter,SeriesEndCounter) = {
7+func IssueNFTSeries (NFTDescription,IPFSHash,Category) = {
88 let currentKey = toBase58String(i.caller.bytes)
9- let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName))
10- if ((checkseries == NFTSeriesName))
11- then throw("Series Name Already Exist. Choose Another Series Name.")
12- else if ((SeriesStartCounter > SeriesEndCounter))
13- then throw("End Counter must be greater than Start Counter.")
14- else [StringEntry(("NFTSeriesName_" + NFTSeriesName), NFTSeriesName), StringEntry(("NFTDescription_" + NFTSeriesName), NFTDescription), StringEntry(("SeriesIssuerPubkey_" + NFTSeriesName), currentKey), IntegerEntry(("SeriesStartCounter_" + NFTSeriesName), SeriesStartCounter), IntegerEntry(("SeriesEndCounter_" + NFTSeriesName), SeriesEndCounter), IntegerEntry(("SeriesCurrentCounter_" + NFTSeriesName), 0)]
9+ let NFTSeriesName = "A4ADAO"
10+ let getSeriesCounter = match getInteger(this, "Counter") {
11+ case a: Int =>
12+ a
13+ case _ =>
14+ 0
1515 }
16-
17-
18-
19-@Callable(i)
20-func IssueNFTSeries (NFTSeriesName) = {
21- let currentKey = toBase58String(i.caller.bytes)
22- let getSeriesStartCounter = getIntegerValue(this, ("SeriesStartCounter_" + NFTSeriesName))
23- let getSeriesEndCounter = getIntegerValue(this, ("SeriesEndCounter_" + NFTSeriesName))
24- let getSeriesCurrentCounter = getIntegerValue(this, ("SeriesCurrentCounter_" + NFTSeriesName))
25- let getSeriesNewCounter = (getSeriesCurrentCounter + 1)
26- let asset = Issue(((NFTSeriesName + "-") + toString(getSeriesNewCounter)), getStringValue(this, ("NFTDescription_" + NFTSeriesName)), 1, 0, false, unit, 0)
16+ let CurrentSeriesCounter = (getSeriesCounter + 1)
17+ let asset = Issue(((NFTSeriesName + "-") + toString(CurrentSeriesCounter)), NFTDescription, 1, 0, false, unit, 0)
2718 let assetId = calculateAssetId(asset)
28- let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName))
29- let checkseriesissuerpubkey = getStringValue(this, ("SeriesIssuerPubkey_" + NFTSeriesName))
30- if ((checkseriesissuerpubkey != currentKey))
31- then throw(((("I know You are not An Admin. Only " + checkseriesissuerpubkey) + " has rights to issue NFT. But You are ") + currentKey))
32- else if ((getSeriesNewCounter > getSeriesEndCounter))
33- then throw((("Counter to Mint " + NFTSeriesName) + " is Finished. Create a New Series Please."))
34- else if ((checkseries == NFTSeriesName))
35- then [asset, IntegerEntry(("SeriesStartCounter_" + NFTSeriesName), getSeriesStartCounter), IntegerEntry(("SeriesEndCounter_" + NFTSeriesName), getSeriesEndCounter), IntegerEntry(("SeriesCurrentCounter_" + NFTSeriesName), getSeriesNewCounter), ScriptTransfer(i.caller, 1, assetId)]
36- else throw("Name Not Found.")
37- }
38-
39-
40-
41-@Callable(i)
42-func UploadNFTSeriesImg (NFTSeriesName,NFTSeriesImg) = {
43- let currentKey = toBase58String(i.caller.bytes)
44- let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName))
45- let checkseriesissuerpubkey = getStringValue(this, ("SeriesIssuerPubkey_" + NFTSeriesName))
46- if ((size(NFTSeriesImg) > 150000))
47- then throw("NFT Image Size can't Exceed 150kb as of now.")
48- else if ((checkseriesissuerpubkey != currentKey))
49- then throw(((("I know You are not An Admin. Only " + checkseriesissuerpubkey) + " has rights to issue NFT. But You are ") + currentKey))
50- else if ((checkseries == NFTSeriesName))
51- then [StringEntry(("Image_" + NFTSeriesName), NFTSeriesImg)]
52- else throw("Name Not Found.")
19+[asset, IntegerEntry("Counter", CurrentSeriesCounter), IntegerEntry(("Timestamp_" + IPFSHash), lastBlock.timestamp), StringEntry(IPFSHash, currentKey), StringEntry(("Link_" + IPFSHash), ("https://api.ipfsbrowser.com/ipfs/get.php?hash=" + IPFSHash)), ScriptTransfer(i.caller, 1, assetId)]
5320 }
5421
5522
5623 @Verifier(tx)
5724 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5825

github/deemru/w8io/026f985 
42.48 ms