tx · GLoqNjsdYiwo9kf7X7RPdXRMAFPGbAF23HHB83BDB6Wm 3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz: -0.01400000 Waves 2022.10.19 17:57 [2279417] smart account 3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz > SELF 0.00000000 Waves
{ "type": 13, "id": "GLoqNjsdYiwo9kf7X7RPdXRMAFPGbAF23HHB83BDB6Wm", "fee": 1400000, "feeAssetId": null, "timestamp": 1666191480040, "version": 2, "chainId": 84, "sender": "3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz", "senderPublicKey": "AmNGcQhk77jcLZEVysQPbYbF3QCHAzQH9Zc9oRZB963h", "proofs": [ "53Q73j96kqRwNZN1y1STdNXcWAZDEXNTkCGJ7kCSXa8svB21nVu7fTFaEKE5MuHKMF2UNSS4ThxpVeAoueXaXobN" ], "script": "base64:AAIEAAAAAAAAABUIAhIGCgQICAEBEgMKAQgSBAoCCAgAAAAAAAAAAwAAAAFpAQAAABFSZWdpc3Rlck5GVFNlcmllcwAAAAQAAAANTkZUU2VyaWVzTmFtZQAAAA5ORlREZXNjcmlwdGlvbgAAABJTZXJpZXNTdGFydENvdW50ZXIAAAAQU2VyaWVzRW5kQ291bnRlcgQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAtjaGVja3NlcmllcwkABB0AAAACBQAAAAR0aGlzCQABLAAAAAICAAAADk5GVFNlcmllc05hbWVfBQAAAA1ORlRTZXJpZXNOYW1lAwkAAAAAAAACBQAAAAtjaGVja3NlcmllcwUAAAANTkZUU2VyaWVzTmFtZQkAAAIAAAABAgAAADZTZXJpZXMgTmFtZSBBbHJlYWR5IEV4aXN0LiBDaG9vc2UgQW5vdGhlciBTZXJpZXMgTmFtZS4DCQAAZgAAAAIFAAAAElNlcmllc1N0YXJ0Q291bnRlcgUAAAAQU2VyaWVzRW5kQ291bnRlcgkAAAIAAAABAgAAAC9FbmQg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0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleZ7dzWY=", "height": 2279417, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FY5aMhucHEuXySb8xGiT89yUrVibUDnaqRur25oQ2WCW Next: 2pLxhjVozXcwLwSe2Zm6UJ9K8pDiLif4GKkTK7uMWDub Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func | |
7 | + | func RegisterNFTSeries (NFTSeriesName,NFTDescription,SeriesStartCounter,SeriesEndCounter) = { | |
8 | 8 | let currentKey = toBase58String(i.caller.bytes) | |
9 | - | let asset = Issue(NFTName, NFTDescription, 1, 0, false, unit, 0) | |
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)] | |
15 | + | } | |
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) | |
10 | 27 | let assetId = calculateAssetId(asset) | |
11 | - | if ((1 > size(NFTName))) | |
12 | - | then throw("No Name Mentioned for NFT, Please Enter Some Name.") | |
13 | - | else if ((1 > size(NFTDescription))) | |
14 | - | then throw("No Description Mentioned for NFT, Please Enter Some Description.") | |
15 | - | else [asset, StringEntry(("Issuer_" + toBase58String(assetId)), currentKey), ScriptTransfer(addressFromPublicKey(i.callerPublicKey), 1, assetId)] | |
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.") | |
16 | 53 | } | |
17 | 54 | ||
18 | 55 |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func | |
7 | + | func RegisterNFTSeries (NFTSeriesName,NFTDescription,SeriesStartCounter,SeriesEndCounter) = { | |
8 | 8 | let currentKey = toBase58String(i.caller.bytes) | |
9 | - | let asset = Issue(NFTName, NFTDescription, 1, 0, false, unit, 0) | |
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)] | |
15 | + | } | |
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) | |
10 | 27 | let assetId = calculateAssetId(asset) | |
11 | - | if ((1 > size(NFTName))) | |
12 | - | then throw("No Name Mentioned for NFT, Please Enter Some Name.") | |
13 | - | else if ((1 > size(NFTDescription))) | |
14 | - | then throw("No Description Mentioned for NFT, Please Enter Some Description.") | |
15 | - | else [asset, StringEntry(("Issuer_" + toBase58String(assetId)), currentKey), ScriptTransfer(addressFromPublicKey(i.callerPublicKey), 1, assetId)] | |
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.") | |
16 | 53 | } | |
17 | 54 | ||
18 | 55 | ||
19 | 56 | @Verifier(tx) | |
20 | 57 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
21 | 58 |
github/deemru/w8io/026f985 46.54 ms ◑