tx · FP9qajierM2eTA6jCyTYyn2gfMppTx9TUxttjuAh348y
3N8mE3Vv1LpKFDxNRtdzBzmMKbwtycbB2KZ: -0.01000000 Waves
2022.02.23 17:17 [1936425] smart account 3N8mE3Vv1LpKFDxNRtdzBzmMKbwtycbB2KZ > SELF 0.00000000 Waves
{
"type": 13,
"id": "FP9qajierM2eTA6jCyTYyn2gfMppTx9TUxttjuAh348y",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1645625875577,
"version": 2,
"chainId": 84,
"sender": "3N8mE3Vv1LpKFDxNRtdzBzmMKbwtycbB2KZ",
"senderPublicKey": "9q7vTvr7sh15ChGajicBoCF1zuKAofLQPeBWFNdNsuA9",
"proofs": [
"5SRsHMnyYaem5QW6PEyQcpFXYow86rS3f4wRTHuHVLKUUHKZ6oHSxo1j6Yyj6maML1KQU5KVrCHNCtGaUHkaxjaT"
],
"script": "base64:AAIFAAAAAAAAAA4IAhIFCgMICAgSAwoBCAAAAAEBAAAAEWlzVmFsaWRDb2xsZWN0aW9uAAAAAQAAAAxjb2xsZWN0aW9uSWQEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAxjb2xsZWN0aW9uSWQCAAAAC19jb2xsZWN0aW9uAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAGBwAAAAIAAAABaQEAAAALaXNzdWVOZXdOZnQAAAADAAAABG5hbWUAAAAMY29sbGVjdGlvbklkAAAACG1ldGFkYXRhAwkAAAAAAAACCQEAAAARaXNWYWxpZENvbGxlY3Rpb24AAAABBQAAAAxjb2xsZWN0aW9uSWQHCQAAAgAAAAECAAAAIVRhcmdldCBjb2xsZWN0aW9uIGRvZXMgbm90IGV4aXN0IQQAAAANY2FsbGVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVhc3NldAkABEIAAAAFBQAAAARuYW1lBQAAAAhtZXRhZGF0YQAAAAAAAAAAAQAAAAAAAAAAAAcEAAAAB2Fzc2V0SWQJAAQ4AAAAAQUAAAAFYXNzZXQEAAAACmFzc2V0SWRTdHIJAAJYAAAAAQUAAAAHYXNzZXRJZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAACmFzc2V0SWRTdHICAAAACF9hc3NldElkBQAAAAphc3NldElkU3RyCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAphc3NldElkU3RyAgAAAA5fY29sbGVjdGlvbklkXwUAAAAMY29sbGVjdGlvbklkBQAAAAphc3NldElkU3RyCQAETAAAAAIFAAAABWFzc2V0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQUAAAANY2FsbGVyQWRkcmVzcwAAAAAAAAAAAQUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAWkBAAAAEGNyZWF0ZUNvbGxlY3Rpb24AAAABAAAACG1ldGFkYXRhBAAAAAxjb2xsZWN0aW9uSWQJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAADGNvbGxlY3Rpb25JZAIAAAALX2NvbGxlY3Rpb24FAAAACG1ldGFkYXRhBQAAAANuaWwAAAAAwDXvgw==",
"height": 1936425,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: EUuZBL1LH5GRT7p3kSADThZ9DFCTdva5FL66YUi5MGBE
Next: 9LoU56NBA4rRgDxBcuFUHgLZnneh1RzEVmWNM1ZRZuyj
Diff:
Old | New | | Differences |
---|
17 | 17 | | let asset = Issue(name, metadata, 1, 0, false) |
---|
18 | 18 | | let assetId = calculateAssetId(asset) |
---|
19 | 19 | | let assetIdStr = toBase58String(assetId) |
---|
20 | | - | [StringEntry((assetIdStr + "_assetId"), assetIdStr), StringEntry((assetIdStr + "_collectionId"), assetIdStr), asset, ScriptTransfer(value(addressFromString(callerAddress)), 1, assetId)] |
---|
| 20 | + | [StringEntry((assetIdStr + "_assetId"), assetIdStr), StringEntry(((assetIdStr + "_collectionId_") + collectionId), assetIdStr), asset, ScriptTransfer(value(addressFromString(callerAddress)), 1, assetId)] |
---|
21 | 21 | | } |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func isValidCollection (collectionId) = match getString(this, (collectionId + "_collection")) { |
---|
5 | 5 | | case b: String => |
---|
6 | 6 | | true |
---|
7 | 7 | | case _ => |
---|
8 | 8 | | false |
---|
9 | 9 | | } |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | 13 | | func issueNewNft (name,collectionId,metadata) = if ((isValidCollection(collectionId) == false)) |
---|
14 | 14 | | then throw("Target collection does not exist!") |
---|
15 | 15 | | else { |
---|
16 | 16 | | let callerAddress = toBase58String(i.caller.bytes) |
---|
17 | 17 | | let asset = Issue(name, metadata, 1, 0, false) |
---|
18 | 18 | | let assetId = calculateAssetId(asset) |
---|
19 | 19 | | let assetIdStr = toBase58String(assetId) |
---|
20 | | - | [StringEntry((assetIdStr + "_assetId"), assetIdStr), StringEntry((assetIdStr + "_collectionId"), assetIdStr), asset, ScriptTransfer(value(addressFromString(callerAddress)), 1, assetId)] |
---|
| 20 | + | [StringEntry((assetIdStr + "_assetId"), assetIdStr), StringEntry(((assetIdStr + "_collectionId_") + collectionId), assetIdStr), asset, ScriptTransfer(value(addressFromString(callerAddress)), 1, assetId)] |
---|
21 | 21 | | } |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | 25 | | @Callable(i) |
---|
26 | 26 | | func createCollection (metadata) = { |
---|
27 | 27 | | let collectionId = toBase58String(i.transactionId) |
---|
28 | 28 | | [StringEntry((collectionId + "_collection"), metadata)] |
---|
29 | 29 | | } |
---|
30 | 30 | | |
---|
31 | 31 | | |
---|