tx · Bi5AtqzMHNacaLhU3zHx21yceJTVu8c5zGi3nYRAyZvh 3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz: -0.02500000 Waves 2022.10.19 18:44 [2279466] smart account 3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz > SELF 0.00000000 Waves
{ "type": 13, "id": "Bi5AtqzMHNacaLhU3zHx21yceJTVu8c5zGi3nYRAyZvh", "fee": 2500000, "feeAssetId": null, "timestamp": 1666194266387, "version": 2, "chainId": 84, "sender": "3My2v1xv9oXvkdoVBjdoPJwsyxswKABGzXz", "senderPublicKey": "AmNGcQhk77jcLZEVysQPbYbF3QCHAzQH9Zc9oRZB963h", "proofs": [ "5veNK6Yzw9UUh8gxzbuhE8KZX3yFFiCybQ7Lbqk92CfQbDY5pABeSgSH3sHtuGcfyjqMvsaAMRRbvBaBqape2gij" ], "script": "base64:AAIFAAAAAAAAABUIAhIGCgQICAEBEgMKAQgSBAoCCAgAAAAAAAAAAwAAAAFpAQAAABFSZWdpc3Rlck5GVFNlcmllcwAAAAQAAAANTkZUU2VyaWVzTmFtZQAAAA5ORlREZXNjcmlwdGlvbgAAABJTZXJpZXNTdGFydENvdW50ZXIAAAAQU2VyaWVzRW5kQ291bnRlcgQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAtjaGVja3NlcmllcwkABB0AAAACBQAAAAR0aGlzCQABLAAAAAICAAAADk5GVFNlcmllc05hbWVfBQAAAA1ORlRTZXJpZXNOYW1lAwkAAAAAAAACBQAAAAtjaGVja3NlcmllcwUAAAANTkZUU2VyaWVzTmFtZQkAAAIAAAABAgAAADZTZXJpZXMgTmFtZSBBbHJlYWR5IEV4aXN0LiBDaG9vc2UgQW5vdGhlciBTZXJpZXMgTmFtZS4DCQAAZgAAAAIFAAAAElNlcmllc1N0YXJ0Q291bnRlcgUAAAAQU2VyaWVzRW5kQ291bnRlcgkAAAIAAAABAgAAAC9FbmQg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0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleSfO4gg=", "height": 2279466, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2pLxhjVozXcwLwSe2Zm6UJ9K8pDiLif4GKkTK7uMWDub Next: EXkyNRLu4QFJGQGi6d4aoLoaBrrhThyRJiZz5aKH6e4W Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func RegisterNFTSeries (NFTSeriesName,NFTDescription,SeriesStartCounter,SeriesEndCounter) = { | |
8 | 8 | let currentKey = toBase58String(i.caller.bytes) | |
9 | 9 | let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName)) | |
10 | 10 | if ((checkseries == NFTSeriesName)) | |
11 | 11 | then throw("Series Name Already Exist. Choose Another Series Name.") | |
12 | 12 | else if ((SeriesStartCounter > SeriesEndCounter)) | |
13 | 13 | then throw("End Counter must be greater than Start Counter.") | |
14 | 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 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(i) | |
20 | 20 | func IssueNFTSeries (NFTSeriesName) = { | |
21 | 21 | let currentKey = toBase58String(i.caller.bytes) | |
22 | 22 | let getSeriesStartCounter = getIntegerValue(this, ("SeriesStartCounter_" + NFTSeriesName)) | |
23 | 23 | let getSeriesEndCounter = getIntegerValue(this, ("SeriesEndCounter_" + NFTSeriesName)) | |
24 | 24 | let getSeriesCurrentCounter = getIntegerValue(this, ("SeriesCurrentCounter_" + NFTSeriesName)) | |
25 | 25 | let getSeriesNewCounter = (getSeriesCurrentCounter + 1) | |
26 | 26 | let asset = Issue(((NFTSeriesName + "-") + toString(getSeriesNewCounter)), getStringValue(this, ("NFTDescription_" + NFTSeriesName)), 1, 0, false, unit, 0) | |
27 | 27 | let assetId = calculateAssetId(asset) | |
28 | 28 | let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName)) | |
29 | 29 | let checkseriesissuerpubkey = getStringValue(this, ("SeriesIssuerPubkey_" + NFTSeriesName)) | |
30 | 30 | if ((checkseriesissuerpubkey != currentKey)) | |
31 | 31 | then throw(((("I know You are not An Admin. Only " + checkseriesissuerpubkey) + " has rights to issue NFT. But You are ") + currentKey)) | |
32 | 32 | else if ((getSeriesNewCounter > getSeriesEndCounter)) | |
33 | 33 | then throw((("Counter to Mint " + NFTSeriesName) + " is Finished. Create a New Series Please.")) | |
34 | 34 | else if ((checkseries == NFTSeriesName)) | |
35 | 35 | then [asset, IntegerEntry(("SeriesStartCounter_" + NFTSeriesName), getSeriesStartCounter), IntegerEntry(("SeriesEndCounter_" + NFTSeriesName), getSeriesEndCounter), IntegerEntry(("SeriesCurrentCounter_" + NFTSeriesName), getSeriesNewCounter), ScriptTransfer(i.caller, 1, assetId)] | |
36 | 36 | else throw("Name Not Found.") | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Callable(i) | |
42 | 42 | func UploadNFTSeriesImg (NFTSeriesName,NFTSeriesImg) = { | |
43 | 43 | let currentKey = toBase58String(i.caller.bytes) | |
44 | 44 | let checkseries = getString(this, ("NFTSeriesName_" + NFTSeriesName)) | |
45 | 45 | let checkseriesissuerpubkey = getStringValue(this, ("SeriesIssuerPubkey_" + NFTSeriesName)) | |
46 | 46 | if ((size(NFTSeriesImg) > 150000)) | |
47 | 47 | then throw("NFT Image Size can't Exceed 150kb as of now.") | |
48 | 48 | else if ((checkseriesissuerpubkey != currentKey)) | |
49 | 49 | then throw(((("I know You are not An Admin. Only " + checkseriesissuerpubkey) + " has rights to issue NFT. But You are ") + currentKey)) | |
50 | 50 | else if ((checkseries == NFTSeriesName)) | |
51 | 51 | then [StringEntry(("Image_" + NFTSeriesName), NFTSeriesImg)] | |
52 | 52 | else throw("Name Not Found.") | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | @Verifier(tx) | |
57 | 57 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
58 | 58 |
github/deemru/w8io/169f3d6 42.77 ms ◑