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 Full:
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(a) | |
7 | - | func CreateNFT (b,c) = { | |
8 | - | let d = toBase58String(a.caller.bytes) | |
9 | - | let e = Issue(b, c, 1, 0, false, unit, 0) | |
10 | - | let f = calculateAssetId(e) | |
11 | - | if ((1 > size(b))) | |
12 | - | then throw("No Name Mentioned for NFT, Please Enter Some Name.") | |
13 | - | else if ((1 > size(c))) | |
14 | - | then throw("No Description Mentioned for NFT, Please Enter Some Description.") | |
15 | - | else [e, StringEntry(("Issuer_" + toBase58String(f)), d), ScriptTransfer(addressFromPublicKey(a.callerPublicKey), 1, f)] | |
7 | + | func RegisterNFTSeries (b,c,d,e) = { | |
8 | + | let f = toBase58String(a.caller.bytes) | |
9 | + | let g = getString(this, ("NFTSeriesName_" + b)) | |
10 | + | if ((g == b)) | |
11 | + | then throw("Series Name Already Exist. Choose Another Series Name.") | |
12 | + | else if ((d > e)) | |
13 | + | then throw("End Counter must be greater than Start Counter.") | |
14 | + | else [StringEntry(("NFTSeriesName_" + b), b), StringEntry(("NFTDescription_" + b), c), StringEntry(("SeriesIssuerPubkey_" + b), f), IntegerEntry(("SeriesStartCounter_" + b), d), IntegerEntry(("SeriesEndCounter_" + b), e), IntegerEntry(("SeriesCurrentCounter_" + b), 0)] | |
16 | 15 | } | |
17 | 16 | ||
18 | 17 | ||
19 | - | @Verifier(g) | |
20 | - | func h () = sigVerify(g.bodyBytes, g.proofs[0], g.senderPublicKey) | |
18 | + | ||
19 | + | @Callable(a) | |
20 | + | func IssueNFTSeries (b) = { | |
21 | + | let f = toBase58String(a.caller.bytes) | |
22 | + | let h = getIntegerValue(this, ("SeriesStartCounter_" + b)) | |
23 | + | let i = getIntegerValue(this, ("SeriesEndCounter_" + b)) | |
24 | + | let j = getIntegerValue(this, ("SeriesCurrentCounter_" + b)) | |
25 | + | let k = (j + 1) | |
26 | + | let l = Issue(((b + "-") + toString(k)), getStringValue(this, ("NFTDescription_" + b)), 1, 0, false, unit, 0) | |
27 | + | let m = calculateAssetId(l) | |
28 | + | let g = getString(this, ("NFTSeriesName_" + b)) | |
29 | + | let n = getStringValue(this, ("SeriesIssuerPubkey_" + b)) | |
30 | + | if ((n != f)) | |
31 | + | then throw(((("I know You are not An Admin. Only " + n) + " has rights to issue NFT. But You are ") + f)) | |
32 | + | else if ((k > i)) | |
33 | + | then throw((("Counter to Mint " + b) + " is Finished. Create a New Series Please.")) | |
34 | + | else if ((g == b)) | |
35 | + | then [l, IntegerEntry(("SeriesStartCounter_" + b), h), IntegerEntry(("SeriesEndCounter_" + b), i), IntegerEntry(("SeriesCurrentCounter_" + b), k), ScriptTransfer(a.caller, 1, m)] | |
36 | + | else throw("Name Not Found.") | |
37 | + | } | |
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | @Callable(a) | |
42 | + | func UploadNFTSeriesImg (b,o) = { | |
43 | + | let f = toBase58String(a.caller.bytes) | |
44 | + | let g = getString(this, ("NFTSeriesName_" + b)) | |
45 | + | let n = getStringValue(this, ("SeriesIssuerPubkey_" + b)) | |
46 | + | if ((size(o) > 150000)) | |
47 | + | then throw("NFT Image Size can't Exceed 150kb as of now.") | |
48 | + | else if ((n != f)) | |
49 | + | then throw(((("I know You are not An Admin. Only " + n) + " has rights to issue NFT. But You are ") + f)) | |
50 | + | else if ((g == b)) | |
51 | + | then [StringEntry(("Image_" + b), o)] | |
52 | + | else throw("Name Not Found.") | |
53 | + | } | |
54 | + | ||
55 | + | ||
56 | + | @Verifier(p) | |
57 | + | func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey) | |
21 | 58 |
github/deemru/w8io/169f3d6 34.99 ms ◑