tx · AthhZppPwRCVCKZHj4iLGNaShr4pgV1ft2khTrSbybK7 3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx: -0.01400000 Waves 2022.04.13 00:51 [2005930] smart account 3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx > SELF 0.00000000 Waves
{ "type": 13, "id": "AthhZppPwRCVCKZHj4iLGNaShr4pgV1ft2khTrSbybK7", "fee": 1400000, "feeAssetId": null, "timestamp": 1649800381488, "version": 2, "chainId": 84, "sender": "3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx", "senderPublicKey": "3karvhVe3LgRMXprezaPpdeYknh9ju1rETVV3zdunQ1p", "proofs": [ "RNnXn1ZBkUMPX6f9ruVmRxxXzqZZm45FryxjSswVVnEmnvuYAbDL13vHkLi1WE1whDR9c5D2zchwsGQuBBrJBEs" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIICAAAAAAAAAABAAAAAWkBAAAADFJlZ2lzdGVyTmFtZQAAAAIAAAAIVXNlck5hbWUAAAAPVXNlckRlc2NyaXB0aW9uBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAC2NoZWNrc2VyaWVzCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAJVXNlck5hbWVfBQAAAAhVc2VyTmFtZQMJAABmAAAAAgAAAAAAAAAAAwkAATEAAAABBQAAAAhVc2VyTmFtZQkAAAIAAAABAgAAACdDaG9vc2UgYSBVbmlxdWUgVXNlck5hbWUgYWJvdmUgMyBDaGFycy4DCQAAAAAAAAIFAAAAC2NoZWNrc2VyaWVzBQAAAAhVc2VyTmFtZQkAAAIAAAABAgAAAEJVc2VyIE5hbWUgQWxyZWFkeSBFeGlzdCBvciBUYWtlbi4gQ2hvb3NlIEFub3RoZXIgVW5pcXVlIFVzZXIgTmFtZS4JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAAlVc2VyTmFtZV8FAAAACFVzZXJOYW1lBQAAAAhVc2VyTmFtZQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAAEFVzZXJEZXNjcmlwdGlvbl8FAAAACFVzZXJOYW1lBQAAAA9Vc2VyRGVzY3JpcHRpb24JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAAxVc2VyQWRkcmVzc18FAAAACFVzZXJOYW1lBQAAAApjdXJyZW50S2V5CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAAGkFjY291bnRfQ3JlYXRpb25fVGltZVN0YW1wBQAAAAhVc2VyTmFtZQgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAPTWVzc2FnZUNvdW50ZXJfBQAAAAhVc2VyTmFtZQAAAAAAAAAAAAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXld+k7L", "height": 2005930, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9ixt5jW6HuccsRYgcYe9fH89u2QErHE8vvDD5956kKL8 Next: HmNPYYd6ZfPY58gEj15YccakGgCpe9RMwgoLise8Yp5N Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | } | |
16 | 16 | ||
17 | 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) | |
27 | - | 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 | 18 | @Verifier(tx) | |
41 | 19 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
42 | 20 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func RegisterName (UserName,UserDescription) = { | |
8 | 8 | let currentKey = toBase58String(i.caller.bytes) | |
9 | 9 | let checkseries = getString(this, ("UserName_" + UserName)) | |
10 | 10 | if ((3 > size(UserName))) | |
11 | 11 | then throw("Choose a Unique UserName above 3 Chars.") | |
12 | 12 | else if ((checkseries == UserName)) | |
13 | 13 | then throw("User Name Already Exist or Taken. Choose Another Unique User Name.") | |
14 | 14 | else [StringEntry(("UserName_" + UserName), UserName), StringEntry(("UserDescription_" + UserName), UserDescription), StringEntry(("UserAddress_" + UserName), currentKey), IntegerEntry(("Account_Creation_TimeStamp" + UserName), lastBlock.timestamp), IntegerEntry(("MessageCounter_" + UserName), 0)] | |
15 | 15 | } | |
16 | 16 | ||
17 | 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) | |
27 | - | 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 | 18 | @Verifier(tx) | |
41 | 19 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
42 | 20 |
github/deemru/w8io/169f3d6 25.69 ms ◑