tx · HJtNYUjptmGXrxw29UivPMWBYiRnLopStemrBVbA6f7y 3MxZp5dE4bdw4ySwWuP8oa5u7oJ9v3mCd9o: -0.01400000 Waves 2020.09.07 08:38 [1166568] smart account 3MxZp5dE4bdw4ySwWuP8oa5u7oJ9v3mCd9o > SELF 0.00000000 Waves
{ "type": 13, "id": "HJtNYUjptmGXrxw29UivPMWBYiRnLopStemrBVbA6f7y", "fee": 1400000, "feeAssetId": null, "timestamp": 1599457127837, "version": 2, "chainId": 84, "sender": "3MxZp5dE4bdw4ySwWuP8oa5u7oJ9v3mCd9o", "senderPublicKey": "6Bsee4KX5PTUcBfCH4bFHLzLRZSPQF8HH4oYtNZFsCAG", "proofs": [ "2oJGJUtLqvuybJm4EG8NNJjVS9bAMVAQjTUe2FRYHhBAgNPRgLf3eRVMqqNVuJbNyGWNwgAZJhWjGJ9JQ93riZwE" ], "script": "base64:AAIEAAAAAAAAABIIAhIOCgwICAgICAgBCAgICAgAAAAiAAAAAA9zdG9yYWdlVmVyaWZpZXIJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM04yczVSdGFIUEJlbkNzeDJFQ2NvRlJiWUh4M25vWmhYVzEAAAAADXVzZXJXaGl0ZWxpc3QJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM01wSkViMzZaUXlrMWhhS25vY2F5SmNZTTMxY05QWFBpSzMAAAAADHNpZ25WZXJpZmllcgkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTkMyOGhTaXZybXNUVVhhWUQxeDZMMzYySjRacFVub1RkQgAAAAANYWNjZXB0ZWRUb2tlbgEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresAAAAABnVzZG5JRAIAAAAsM0tGWEJHR0xDakE1WjJEdVc0RHE5ZkREckhqSkpQMVpFa2FvYWpTenVLc0MAAAAABWFkbWluAgAAACMzTkNxcGRiOGpIVzFkMWhxWmdlUzlBRTJNSjJLZWg5NWpNQw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lckFkZHJlc3MFAAAABWFydElkBQAAAAdtYXhtaW50CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAxrZXlBcnRTaWduSUQAAAACBQAAAA1jYWxsZXJBZGRyZXNzBQAAAAVhcnRJZAUAAAAGc2lnbklECQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAMa2V5QXJ0SXNzdWVkAAAAAgUAAAANY2FsbGVyQWRkcmVzcwUAAAAFYXJ0SWQAAAAAAAAAAAAJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIJAQAAAAxrZXlBcnRPblNhbGUAAAACBQAAAA1jYWxsZXJBZGRyZXNzBQAAAAVhcnRJZAcJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAObGFzdF9pbnZva2VfaWQFAAAABWFydElkBQAAAANuaWwAAAAAg3VhtQ==", "height": 1166568, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GvGjnDknaofasdYQi5ombr8MTgQsy6YENSnoJAZrdDdt Next: GGDFEb91qvr2CBSWBjxsKVWgRv7rLe3H91LR44UqzaAk Diff:
Old | New | Differences | |
---|---|---|---|
45 | 45 | case _ => | |
46 | 46 | 0 | |
47 | 47 | } | |
48 | + | ||
49 | + | ||
50 | + | func keyUserIsArtist (callerAddr) = ("user_isartist_" + callerAddr) | |
48 | 51 | ||
49 | 52 | ||
50 | 53 | func keyArtDate (callerAddr,artId) = ((("art_date_" + artId) + "_") + callerAddr) | |
100 | 103 | let artId = toBase58String(invoke.transactionId) | |
101 | 104 | let callerAddress = toBase58String(invoke.caller.bytes) | |
102 | 105 | let timestamp = lastBlock.timestamp | |
103 | - | [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry("last_invoke_id", artId)] | |
106 | + | [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), BooleanEntry(keyUserIsArtist(callerAddress), true), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry("last_invoke_id", artId)] | |
104 | 107 | } | |
105 | 108 | ||
106 | 109 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
5 | 5 | ||
6 | 6 | let userWhitelist = value(addressFromString("3MpJEb36ZQyk1haKnocayJcYM31cNPXPiK3")) | |
7 | 7 | ||
8 | 8 | let signVerifier = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
9 | 9 | ||
10 | 10 | let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
11 | 11 | ||
12 | 12 | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
13 | 13 | ||
14 | 14 | let admin = "3NCqpdb8jHW1d1hqZgeS9AE2MJ2Keh95jMC" | |
15 | 15 | ||
16 | 16 | let VERIFIEDONLY = true | |
17 | 17 | ||
18 | 18 | let userCreated = "CREATED" | |
19 | 19 | ||
20 | 20 | let userVerified = "VERIFIED" | |
21 | 21 | ||
22 | 22 | let userSuspended = "SUSPENDED" | |
23 | 23 | ||
24 | 24 | let userRemoved = "REMOVED" | |
25 | 25 | ||
26 | 26 | let userUnregistered = "UNREGISTERED" | |
27 | 27 | ||
28 | 28 | let onSale = "ON_SALE" | |
29 | 29 | ||
30 | 30 | let sold = "SOLD" | |
31 | 31 | ||
32 | 32 | let canceled = "CANCELED" | |
33 | 33 | ||
34 | 34 | func getStringByKey (key) = match getString(this, key) { | |
35 | 35 | case a: String => | |
36 | 36 | a | |
37 | 37 | case _ => | |
38 | 38 | "" | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func getIntegerByKey (key) = match getInteger(this, key) { | |
43 | 43 | case i: Int => | |
44 | 44 | i | |
45 | 45 | case _ => | |
46 | 46 | 0 | |
47 | 47 | } | |
48 | + | ||
49 | + | ||
50 | + | func keyUserIsArtist (callerAddr) = ("user_isartist_" + callerAddr) | |
48 | 51 | ||
49 | 52 | ||
50 | 53 | func keyArtDate (callerAddr,artId) = ((("art_date_" + artId) + "_") + callerAddr) | |
51 | 54 | ||
52 | 55 | ||
53 | 56 | func keyArtName (callerAddr,artId) = ((("art_name_" + artId) + "_") + callerAddr) | |
54 | 57 | ||
55 | 58 | ||
56 | 59 | func keyArtDesc (callerAddr,artId) = ((("art_desc_" + artId) + "_") + callerAddr) | |
57 | 60 | ||
58 | 61 | ||
59 | 62 | func keyArtDisplayCid (callerAddr,artId) = ((("art_display_cid_" + artId) + "_") + callerAddr) | |
60 | 63 | ||
61 | 64 | ||
62 | 65 | func keyArtExportHash (callerAddr,artId) = ((("art_export_hash_" + artId) + "_") + callerAddr) | |
63 | 66 | ||
64 | 67 | ||
65 | 68 | func keyArtExportCid (callerAddr,artId) = ((("art_export_cid_" + artId) + "_") + callerAddr) | |
66 | 69 | ||
67 | 70 | ||
68 | 71 | func keyArtMaxMint (callerAddr,artId) = ((("art_maxmint_" + artId) + "_") + callerAddr) | |
69 | 72 | ||
70 | 73 | ||
71 | 74 | func keyArtSignID (callerAddr,artId) = ((("art_signid_" + artId) + "_") + callerAddr) | |
72 | 75 | ||
73 | 76 | ||
74 | 77 | func keyArtIssued (callerAddr,artId) = ((("art_issued_" + artId) + "_") + callerAddr) | |
75 | 78 | ||
76 | 79 | ||
77 | 80 | func keyArtOnSale (callerAddr,artId) = ((("art_onsale_" + artId) + "_") + callerAddr) | |
78 | 81 | ||
79 | 82 | ||
80 | 83 | func keyArtLicenceHash (callerAddr,artId) = ((("art_licence_hash_" + artId) + "_") + callerAddr) | |
81 | 84 | ||
82 | 85 | ||
83 | 86 | func keyArtLicenceCid (callerAddr,artId) = ((("art_licence_cid_" + artId) + "_") + callerAddr) | |
84 | 87 | ||
85 | 88 | ||
86 | 89 | func keyArtTags (callerAddr,artId) = ((("art_tags_" + artId) + "_") + callerAddr) | |
87 | 90 | ||
88 | 91 | ||
89 | 92 | func keyArtType (callerAddr,artId) = ((("art_type_" + artId) + "_") + callerAddr) | |
90 | 93 | ||
91 | 94 | ||
92 | 95 | func keyArtOwnerByHash (sha256Hash) = ("art_owner_by_hash_" + sha256Hash) | |
93 | 96 | ||
94 | 97 | ||
95 | 98 | func keyArtTxidByHashOwner (sha256Hash,callerAddr) = ("art_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + callerAddr))))) | |
96 | 99 | ||
97 | 100 | ||
98 | 101 | @Callable(invoke) | |
99 | 102 | func addArtwork (sha256Hash,signID,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
100 | 103 | let artId = toBase58String(invoke.transactionId) | |
101 | 104 | let callerAddress = toBase58String(invoke.caller.bytes) | |
102 | 105 | let timestamp = lastBlock.timestamp | |
103 | - | [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry("last_invoke_id", artId)] | |
106 | + | [StringEntry(keyArtOwnerByHash(sha256Hash), callerAddress), StringEntry(keyArtTxidByHashOwner(sha256Hash, callerAddress), artId), BooleanEntry(keyUserIsArtist(callerAddress), true), IntegerEntry(keyArtDate(callerAddress, artId), timestamp), StringEntry(keyArtName(callerAddress, artId), name), StringEntry(keyArtDesc(callerAddress, artId), description), StringEntry(keyArtDisplayCid(callerAddress, artId), cidDisplay), StringEntry(keyArtExportCid(callerAddress, artId), cidExport), StringEntry(keyArtExportHash(callerAddress, artId), sha256Export), StringEntry(keyArtLicenceHash(callerAddress, artId), sha256Licence), StringEntry(keyArtLicenceCid(callerAddress, artId), cidLicence), StringEntry(keyArtType(callerAddress, artId), type), StringEntry(keyArtTags(callerAddress, artId), tags), IntegerEntry(keyArtMaxMint(callerAddress, artId), maxmint), StringEntry(keyArtSignID(callerAddress, artId), signID), IntegerEntry(keyArtIssued(callerAddress, artId), 0), BooleanEntry(keyArtOnSale(callerAddress, artId), false), StringEntry("last_invoke_id", artId)] | |
104 | 107 | } | |
105 | 108 | ||
106 | 109 |
github/deemru/w8io/026f985 43.07 ms ◑