tx · CEnkytyM37DR8WkzB75UajwaiEsAs3x3fEgXM5S1qAyb 3My71eA5781UVppziZNzPzoaXoQ79XLfpou: -0.01400000 Waves 2020.09.17 10:17 [1180954] smart account 3My71eA5781UVppziZNzPzoaXoQ79XLfpou > SELF 0.00000000 Waves
{ "type": 13, "id": "CEnkytyM37DR8WkzB75UajwaiEsAs3x3fEgXM5S1qAyb", "fee": 1400000, "feeAssetId": null, "timestamp": 1600327027526, "version": 2, "chainId": 84, "sender": "3My71eA5781UVppziZNzPzoaXoQ79XLfpou", "senderPublicKey": "xu7oh5A3xfh5PtSRAoZLCyetRFpcf6bq7bCzGtTCUyL", "proofs": [ "5caFUo7CuX9xnRYyWTmsd6cYhcpwSc2zcESNJTH5eMNMhRAVAWCDb3X5Ag8diFkZSqVMjggKdCFzpWzSfuDtzKNX" ], "script": "base64:AAIEAAAAAAAAAE0IAhIGCgQICAgIEgYKBAgICAgSAwoBCBIDCgEIEg4KDAgICAgICAEICAgICBINCgsICAgICAEICAgICBIECgIICBIECgIIARIECgIICAAAAC4AAAAAD3N0b3JhZ2VWZXJpZmllcgkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAANdXNlcldoaXRlbGlzdAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTXBKRWIzNlpReWsxaGFLbm9jYXlKY1lNMzFjTlBYUGlLMwAAAAAMc2lnblZlcmlmaWVyCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQzI4aFNpdnJtc1RVWGFZRDF4NkwzNjJKNFpwVW5vVGRCAAAAAAtmZWVSZWNlaXZlcgIAAAAjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIAAAAAC3NpZ25Bc3NldElkAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAGdXNkbklEAgAAACwzS0ZYQk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AAAAAAAQUAAAAFaWRORlQFAAAAA25pbAAAAACcUoex", "height": 1180954, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HH7icM5gE8FzP9YQarSkfigHpW9NFiiL5Ws89st2oGTB Next: 3Fmp3rwDmpPKvjpLJ4Vhr21vkEssm5pa2HkXPuEQyGsS Diff:
Old | New | Differences | |
---|---|---|---|
268 | 268 | let isSignCertified = checkSignCertificate(signID, callerAddress, sha256Hash) | |
269 | 269 | if (!(isSignCertified)) | |
270 | 270 | then throw("Sign Certificate not found on Sign-web.app smart contract for this address.") | |
271 | - | else if ((size(name) == 0)) | |
272 | - | then throw("Title cannot be empty") | |
273 | - | else if ((size(name) > 100)) | |
274 | - | then throw("100 Characters maximum for the name") | |
275 | - | else if ((size(description) > 1000)) | |
276 | - | then throw("1000 Characters maximum for the description") | |
277 | - | else if ((size(description) == 0)) | |
278 | - | then throw("Description cannot be empty") | |
279 | - | else { | |
280 | - | let tagsList = split(tags, ",") | |
281 | - | if ((size(tagsList) > 5)) | |
282 | - | then throw("Tags should be maximum 5 single word separated by space.") | |
283 | - | else { | |
284 | - | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
285 | - | case s: String => | |
286 | - | s | |
287 | - | case _ => | |
288 | - | userUnregistered | |
289 | - | } | |
290 | - | let timestamp = lastBlock.timestamp | |
291 | - | if (if (isDefined(userIsRegistered)) | |
292 | - | then (userIsRegistered == userUnregistered) | |
293 | - | else false) | |
294 | - | then throw("Please register this account first with \"User infos\" tab") | |
295 | - | else if ((userIsRegistered == userSuspended)) | |
296 | - | then throw("Your account is suspended") | |
297 | - | else if ((userIsRegistered == userRemoved)) | |
298 | - | then throw("Your account have been removed") | |
299 | - | else if ((maxmint > 10)) | |
300 | - | then throw("Maximum 10 editions per artwork") | |
301 | - | else if ((size(sha256Hash) != 64)) | |
302 | - | then throw("Hash should be sha256 string composed of 64 char.") | |
303 | - | else [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), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
304 | - | } | |
305 | - | } | |
271 | + | else if ((size(cidDisplay) == 0)) | |
272 | + | then throw("Display CID cannot be empty") | |
273 | + | else if ((size(name) == 0)) | |
274 | + | then throw("Title cannot be empty") | |
275 | + | else if ((size(name) > 100)) | |
276 | + | then throw("100 Characters maximum for the name") | |
277 | + | else if ((size(description) > 1000)) | |
278 | + | then throw("1000 Characters maximum for the description") | |
279 | + | else if ((size(description) == 0)) | |
280 | + | then throw("Description cannot be empty") | |
281 | + | else { | |
282 | + | let tagsList = split(tags, ",") | |
283 | + | if ((size(tagsList) > 5)) | |
284 | + | then throw("Tags should be maximum 5 single word separated by space.") | |
285 | + | else { | |
286 | + | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
287 | + | case s: String => | |
288 | + | s | |
289 | + | case _ => | |
290 | + | userUnregistered | |
291 | + | } | |
292 | + | let timestamp = lastBlock.timestamp | |
293 | + | if (if (isDefined(userIsRegistered)) | |
294 | + | then (userIsRegistered == userUnregistered) | |
295 | + | else false) | |
296 | + | then throw("Please register this account first with \"User infos\" tab") | |
297 | + | else if ((userIsRegistered == userSuspended)) | |
298 | + | then throw("Your account is suspended") | |
299 | + | else if ((userIsRegistered == userRemoved)) | |
300 | + | then throw("Your account have been removed") | |
301 | + | else if ((maxmint > 10)) | |
302 | + | then throw("Maximum 10 editions per artwork") | |
303 | + | else if ((size(sha256Hash) != 64)) | |
304 | + | then throw("Hash should be sha256 string composed of 64 char.") | |
305 | + | else [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), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
306 | + | } | |
307 | + | } | |
306 | 308 | } | |
307 | 309 | } | |
308 | 310 | } |
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 feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
11 | 11 | ||
12 | 12 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
13 | 13 | ||
14 | 14 | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
15 | 15 | ||
16 | 16 | let admin = "3NCqpdb8jHW1d1hqZgeS9AE2MJ2Keh95jMC" | |
17 | 17 | ||
18 | 18 | let WHITELISTEDONLY = true | |
19 | 19 | ||
20 | 20 | let userCreated = "CREATED" | |
21 | 21 | ||
22 | 22 | let userVerified = "VERIFIED" | |
23 | 23 | ||
24 | 24 | let userSuspended = "SUSPENDED" | |
25 | 25 | ||
26 | 26 | let userRemoved = "REMOVED" | |
27 | 27 | ||
28 | 28 | let userUnregistered = "UNREGISTERED" | |
29 | 29 | ||
30 | 30 | let onSale = "ON_SALE" | |
31 | 31 | ||
32 | 32 | let sold = "SOLD" | |
33 | 33 | ||
34 | 34 | let canceled = "CANCELED" | |
35 | 35 | ||
36 | 36 | func getStringByKey (key) = match getString(this, key) { | |
37 | 37 | case a: String => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | "" | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getIntegerByKey (key) = match getInteger(this, key) { | |
45 | 45 | case i: Int => | |
46 | 46 | i | |
47 | 47 | case _ => | |
48 | 48 | 0 | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func checkSignCertificate (signID,Owner,sha256Hash) = match getString(signVerifier, ((("data_fc_" + signID) + "_") + Owner)) { | |
53 | 53 | case a: String => | |
54 | 54 | if (contains(a, sha256Hash)) | |
55 | 55 | then true | |
56 | 56 | else false | |
57 | 57 | case _ => | |
58 | 58 | false | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func validateNFTs (accumulator,id) = { | |
63 | 63 | let assetDetails = value(assetInfo(fromBase58String(id))) | |
64 | 64 | if (if (if ((assetDetails.quantity != 1)) | |
65 | 65 | then true | |
66 | 66 | else (assetDetails.decimals != 0)) | |
67 | 67 | then true | |
68 | 68 | else (assetDetails.reissuable != false)) | |
69 | 69 | then (accumulator + 0) | |
70 | 70 | else (accumulator + 1) | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func verifyAddress (addr) = if (!(WHITELISTEDONLY)) | |
75 | 75 | then true | |
76 | 76 | else match getBoolean(userWhitelist, addr) { | |
77 | 77 | case b: Boolean => | |
78 | 78 | b | |
79 | 79 | case _ => | |
80 | 80 | throw("You are not allowed, please contact us first.") | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func verifyStatus (addr) = match getString(this, ("user_status_" + addr)) { | |
85 | 85 | case b: String => | |
86 | 86 | b | |
87 | 87 | case _ => | |
88 | 88 | throw("Something went wrong.") | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyUserAddr (callerAddr) = ("user_" + callerAddr) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyUserName (callerAddr) = ("user_name_" + callerAddr) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyUserDesc (callerAddr) = ("user_desc_" + callerAddr) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyUserSocial (callerAddr) = ("user_social_" + callerAddr) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyUserThumb (callerAddr) = ("user_thumb_" + callerAddr) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func keyUserIsArtist (callerAddr) = ("user_isartist_" + callerAddr) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyUserStatus (callerAddr) = ("user_status_" + callerAddr) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyUserDate (callerAddr) = ("user_date_" + callerAddr) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyArtDate (callerAddr,artId) = ((("art_date_" + artId) + "_") + callerAddr) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyArtName (callerAddr,artId) = ((("art_name_" + artId) + "_") + callerAddr) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyArtDesc (callerAddr,artId) = ((("art_desc_" + artId) + "_") + callerAddr) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyArtDisplayCid (callerAddr,artId) = ((("art_display_cid_" + artId) + "_") + callerAddr) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyArtExportHash (callerAddr,artId) = ((("art_export_hash_" + artId) + "_") + callerAddr) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyArtExportCid (callerAddr,artId) = ((("art_export_cid_" + artId) + "_") + callerAddr) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func keyArtMaxMint (callerAddr,artId) = ((("art_maxmint_" + artId) + "_") + callerAddr) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func keyArtSignID (callerAddr,artId) = ((("art_signid_" + artId) + "_") + callerAddr) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func keyArtIssued (callerAddr,artId) = ((("art_issued_" + artId) + "_") + callerAddr) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func keyArtOnSale (callerAddr,artId) = ((("art_onsale_" + artId) + "_") + callerAddr) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func keyArtLicenceHash (callerAddr,artId) = ((("art_licence_hash_" + artId) + "_") + callerAddr) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func keyArtLicenceCid (callerAddr,artId) = ((("art_licence_cid_" + artId) + "_") + callerAddr) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func keyArtTags (callerAddr,artId) = ((("art_tags_" + artId) + "_") + callerAddr) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func keyArtType (callerAddr,artId) = ((("art_type_" + artId) + "_") + callerAddr) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyArtOwnerByHash (sha256Hash) = ("art_owner_by_hash_" + sha256Hash) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func keyArtTxidByHashOwner (sha256Hash,callerAddr) = ("art_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + callerAddr))))) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | @Callable(i) | |
165 | 165 | func registerUser (name,description,thumb,social) = { | |
166 | 166 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
167 | 167 | let userAllowed = verifyAddress(callerAddr) | |
168 | 168 | let id = toBase58String(i.transactionId) | |
169 | 169 | let newUser = getStringByKey(("user_" + callerAddr)) | |
170 | 170 | let timestamp = lastBlock.timestamp | |
171 | 171 | if (!(userAllowed)) | |
172 | 172 | then throw("You are now allowed to register yet, please contact us first to get approved.") | |
173 | 173 | else if (if ((name == "")) | |
174 | 174 | then true | |
175 | 175 | else (description == "")) | |
176 | 176 | then throw("Name and description cannot be empty") | |
177 | 177 | else if ((size(description) > 600)) | |
178 | 178 | then throw("600 Characters maximum for the description") | |
179 | 179 | else if ((newUser == "")) | |
180 | 180 | then [IntegerEntry(keyUserDate(callerAddr), timestamp), StringEntry(keyUserAddr(callerAddr), ((id + "_") + toString(lastBlock.timestamp))), StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), BooleanEntry(keyUserIsArtist(callerAddr), false), StringEntry(keyUserStatus(callerAddr), userCreated), StringEntry("last_invoke_id", id)] | |
181 | 181 | else throw("This user is already registered, use updateUser instead") | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(i) | |
187 | 187 | func updateUser (name,description,thumb,social) = { | |
188 | 188 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
189 | 189 | let userAllowed = verifyAddress(callerAddr) | |
190 | 190 | if (!(userAllowed)) | |
191 | 191 | then throw("You are now allowed to update your infos anymore.") | |
192 | 192 | else { | |
193 | 193 | let id = toBase58String(i.transactionId) | |
194 | 194 | let newUser = getStringByKey(("user_" + callerAddr)) | |
195 | 195 | let timestamp = lastBlock.timestamp | |
196 | 196 | let userStatus = verifyStatus(callerAddr) | |
197 | 197 | if ((userStatus == userSuspended)) | |
198 | 198 | then throw("Your account have been suspended") | |
199 | 199 | else if ((userStatus == userRemoved)) | |
200 | 200 | then throw("Your account have been removed") | |
201 | 201 | else if (if ((name == "")) | |
202 | 202 | then true | |
203 | 203 | else (description == "")) | |
204 | 204 | then throw("Name and description cannot be empty") | |
205 | 205 | else if ((size(description) > 600)) | |
206 | 206 | then throw("600 Characters maximum for the description") | |
207 | 207 | else if ((newUser != "")) | |
208 | 208 | then [StringEntry(keyUserName(callerAddr), name), StringEntry(keyUserDesc(callerAddr), description), StringEntry(keyUserSocial(callerAddr), social), StringEntry(keyUserThumb(callerAddr), thumb), StringEntry("last_invoke_id", id)] | |
209 | 209 | else throw("Please register first with registerUser") | |
210 | 210 | } | |
211 | 211 | } | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | ||
215 | 215 | @Callable(i) | |
216 | 216 | func deleteUser (address) = { | |
217 | 217 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
218 | 218 | let id = toBase58String(i.transactionId) | |
219 | 219 | if ((callerAddr != admin)) | |
220 | 220 | then throw("You are not allowed to do that") | |
221 | 221 | else [DeleteEntry(keyUserDate(callerAddr)), DeleteEntry(keyUserAddr(callerAddr)), DeleteEntry(keyUserName(callerAddr)), DeleteEntry(keyUserDesc(callerAddr)), DeleteEntry(keyUserSocial(callerAddr)), DeleteEntry(keyUserThumb(callerAddr)), DeleteEntry(keyUserIsArtist(callerAddr)), StringEntry(keyUserStatus(callerAddr), userRemoved), StringEntry("last_invoke_id", id)] | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | ||
226 | 226 | @Callable(i) | |
227 | 227 | func suspendUser (address) = { | |
228 | 228 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
229 | 229 | let id = toBase58String(i.transactionId) | |
230 | 230 | if ((callerAddr != admin)) | |
231 | 231 | then throw("You are not allowed to do that") | |
232 | 232 | else [StringEntry(keyUserStatus(callerAddr), userSuspended), StringEntry("last_invoke_id", id)] | |
233 | 233 | } | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | ||
237 | 237 | @Callable(invoke) | |
238 | 238 | func addArtwork (sha256Hash,signID,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
239 | 239 | let artId = toBase58String(invoke.transactionId) | |
240 | 240 | let callerAddress = toBase58String(invoke.caller.bytes) | |
241 | 241 | if ((size(invoke.payments) == 0)) | |
242 | 242 | then throw("No payment attached") | |
243 | 243 | else { | |
244 | 244 | let payment = value(invoke.payments[0]) | |
245 | 245 | let amount = value(payment.amount) | |
246 | 246 | let assetId = if (if (isDefined(payment.assetId)) | |
247 | 247 | then (payment.assetId == signAssetId) | |
248 | 248 | else false) | |
249 | 249 | then payment.assetId | |
250 | 250 | else throw("Only SIGN token accepted at the moment") | |
251 | 251 | let currentCertificationPrice = match getInteger(storageVerifier, ("certification_fee_" + toBase58String(signAssetId))) { | |
252 | 252 | case price: Int => | |
253 | 253 | price | |
254 | 254 | case _ => | |
255 | 255 | throw("Price undefined in oracle") | |
256 | 256 | } | |
257 | 257 | if ((amount != currentCertificationPrice)) | |
258 | 258 | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
259 | 259 | else { | |
260 | 260 | let entryExist = getStringByKey(keyArtTxidByHashOwner(sha256Hash, callerAddress)) | |
261 | 261 | if ((entryExist != "")) | |
262 | 262 | then throw("You already added this artwork on Sign Art") | |
263 | 263 | else { | |
264 | 264 | let hashExist = getStringByKey(keyArtOwnerByHash(sha256Hash)) | |
265 | 265 | if ((hashExist != "")) | |
266 | 266 | then throw("This artwork hash is already registered on Sign Art") | |
267 | 267 | else { | |
268 | 268 | let isSignCertified = checkSignCertificate(signID, callerAddress, sha256Hash) | |
269 | 269 | if (!(isSignCertified)) | |
270 | 270 | then throw("Sign Certificate not found on Sign-web.app smart contract for this address.") | |
271 | - | else if ((size(name) == 0)) | |
272 | - | then throw("Title cannot be empty") | |
273 | - | else if ((size(name) > 100)) | |
274 | - | then throw("100 Characters maximum for the name") | |
275 | - | else if ((size(description) > 1000)) | |
276 | - | then throw("1000 Characters maximum for the description") | |
277 | - | else if ((size(description) == 0)) | |
278 | - | then throw("Description cannot be empty") | |
279 | - | else { | |
280 | - | let tagsList = split(tags, ",") | |
281 | - | if ((size(tagsList) > 5)) | |
282 | - | then throw("Tags should be maximum 5 single word separated by space.") | |
283 | - | else { | |
284 | - | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
285 | - | case s: String => | |
286 | - | s | |
287 | - | case _ => | |
288 | - | userUnregistered | |
289 | - | } | |
290 | - | let timestamp = lastBlock.timestamp | |
291 | - | if (if (isDefined(userIsRegistered)) | |
292 | - | then (userIsRegistered == userUnregistered) | |
293 | - | else false) | |
294 | - | then throw("Please register this account first with \"User infos\" tab") | |
295 | - | else if ((userIsRegistered == userSuspended)) | |
296 | - | then throw("Your account is suspended") | |
297 | - | else if ((userIsRegistered == userRemoved)) | |
298 | - | then throw("Your account have been removed") | |
299 | - | else if ((maxmint > 10)) | |
300 | - | then throw("Maximum 10 editions per artwork") | |
301 | - | else if ((size(sha256Hash) != 64)) | |
302 | - | then throw("Hash should be sha256 string composed of 64 char.") | |
303 | - | else [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), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
304 | - | } | |
305 | - | } | |
271 | + | else if ((size(cidDisplay) == 0)) | |
272 | + | then throw("Display CID cannot be empty") | |
273 | + | else if ((size(name) == 0)) | |
274 | + | then throw("Title cannot be empty") | |
275 | + | else if ((size(name) > 100)) | |
276 | + | then throw("100 Characters maximum for the name") | |
277 | + | else if ((size(description) > 1000)) | |
278 | + | then throw("1000 Characters maximum for the description") | |
279 | + | else if ((size(description) == 0)) | |
280 | + | then throw("Description cannot be empty") | |
281 | + | else { | |
282 | + | let tagsList = split(tags, ",") | |
283 | + | if ((size(tagsList) > 5)) | |
284 | + | then throw("Tags should be maximum 5 single word separated by space.") | |
285 | + | else { | |
286 | + | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
287 | + | case s: String => | |
288 | + | s | |
289 | + | case _ => | |
290 | + | userUnregistered | |
291 | + | } | |
292 | + | let timestamp = lastBlock.timestamp | |
293 | + | if (if (isDefined(userIsRegistered)) | |
294 | + | then (userIsRegistered == userUnregistered) | |
295 | + | else false) | |
296 | + | then throw("Please register this account first with \"User infos\" tab") | |
297 | + | else if ((userIsRegistered == userSuspended)) | |
298 | + | then throw("Your account is suspended") | |
299 | + | else if ((userIsRegistered == userRemoved)) | |
300 | + | then throw("Your account have been removed") | |
301 | + | else if ((maxmint > 10)) | |
302 | + | then throw("Maximum 10 editions per artwork") | |
303 | + | else if ((size(sha256Hash) != 64)) | |
304 | + | then throw("Hash should be sha256 string composed of 64 char.") | |
305 | + | else [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), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
306 | + | } | |
307 | + | } | |
306 | 308 | } | |
307 | 309 | } | |
308 | 310 | } | |
309 | 311 | } | |
310 | 312 | } | |
311 | 313 | ||
312 | 314 | ||
313 | 315 | ||
314 | 316 | @Callable(invoke) | |
315 | 317 | func updateArtwork (txid,name,description,tags,type,maxmint,cidDisplay,sha256Export,cidExport,sha256Licence,cidLicence) = { | |
316 | 318 | let updateId = toBase58String(invoke.transactionId) | |
317 | 319 | let callerAddress = toBase58String(invoke.caller.bytes) | |
318 | 320 | let entryExist = getStringByKey(keyArtName(callerAddress, txid)) | |
319 | 321 | if ((entryExist == "")) | |
320 | 322 | then throw("This entry doesn't exist or you are not the owner") | |
321 | 323 | else if ((size(name) == 0)) | |
322 | 324 | then throw("Title cannot be empty") | |
323 | 325 | else if ((size(name) > 100)) | |
324 | 326 | then throw("100 Characters maximum for the name") | |
325 | 327 | else if ((size(description) > 1000)) | |
326 | 328 | then throw("1000 Characters maximum for the description") | |
327 | 329 | else if ((size(description) == 0)) | |
328 | 330 | then throw("Description cannot be empty") | |
329 | 331 | else { | |
330 | 332 | let artworkMinted = match getInteger(this, keyArtIssued(callerAddress, txid)) { | |
331 | 333 | case b: Int => | |
332 | 334 | if ((b == 0)) | |
333 | 335 | then false | |
334 | 336 | else true | |
335 | 337 | case _ => | |
336 | 338 | throw("Something went wrong.") | |
337 | 339 | } | |
338 | 340 | let tagsList = split(tags, ",") | |
339 | 341 | if ((size(tagsList) > 5)) | |
340 | 342 | then throw("Tags should be maximum 5 single word separated by space.") | |
341 | 343 | else { | |
342 | 344 | let userIsRegistered = match getString(this, ("user_status_" + callerAddress)) { | |
343 | 345 | case s: String => | |
344 | 346 | s | |
345 | 347 | case _ => | |
346 | 348 | userUnregistered | |
347 | 349 | } | |
348 | 350 | if (if (isDefined(userIsRegistered)) | |
349 | 351 | then (userIsRegistered == userUnregistered) | |
350 | 352 | else false) | |
351 | 353 | then throw("Please register this account first with \"User infos\" tab") | |
352 | 354 | else if ((userIsRegistered == userSuspended)) | |
353 | 355 | then throw("Your account is suspended") | |
354 | 356 | else if ((userIsRegistered == userRemoved)) | |
355 | 357 | then throw("Your account have been removed") | |
356 | 358 | else if ((maxmint > 10)) | |
357 | 359 | then throw("Maximum 10 editions per artwork") | |
358 | 360 | else if (!(artworkMinted)) | |
359 | 361 | then [StringEntry(keyArtName(callerAddress, txid), name), StringEntry(keyArtDesc(callerAddress, txid), description), StringEntry(keyArtDisplayCid(callerAddress, txid), cidDisplay), StringEntry(keyArtExportCid(callerAddress, txid), cidExport), StringEntry(keyArtExportHash(callerAddress, txid), sha256Export), StringEntry(keyArtLicenceCid(callerAddress, txid), cidLicence), StringEntry(keyArtLicenceHash(callerAddress, txid), sha256Licence), IntegerEntry(keyArtMaxMint(callerAddress, txid), maxmint), StringEntry(keyArtTags(callerAddress, txid), tags), StringEntry(keyArtType(callerAddress, txid), type), StringEntry("last_invoke_id", updateId)] | |
360 | 362 | else [StringEntry(keyArtName(callerAddress, txid), name), StringEntry(keyArtDesc(callerAddress, txid), description), StringEntry(keyArtDisplayCid(callerAddress, txid), cidDisplay), StringEntry(keyArtType(callerAddress, txid), type), StringEntry(keyArtTags(callerAddress, txid), tags), StringEntry("last_invoke_id", updateId)] | |
361 | 363 | } | |
362 | 364 | } | |
363 | 365 | } | |
364 | 366 | ||
365 | 367 | ||
366 | 368 | ||
367 | 369 | @Callable(i) | |
368 | 370 | func deleteArtwork (artId,ownerAddress) = { | |
369 | 371 | let callerAddr = toString(addressFromPublicKey(i.callerPublicKey)) | |
370 | 372 | let id = toBase58String(i.transactionId) | |
371 | 373 | if ((callerAddr != admin)) | |
372 | 374 | then throw("You are not allowed to do that") | |
373 | 375 | else [DeleteEntry(keyArtDate(ownerAddress, artId)), DeleteEntry(keyArtName(ownerAddress, artId)), DeleteEntry(keyArtDesc(ownerAddress, artId)), DeleteEntry(keyArtDisplayCid(ownerAddress, artId)), DeleteEntry(keyArtExportCid(ownerAddress, artId)), DeleteEntry(keyArtExportHash(ownerAddress, artId)), DeleteEntry(keyArtLicenceHash(ownerAddress, artId)), DeleteEntry(keyArtLicenceCid(ownerAddress, artId)), DeleteEntry(keyArtType(ownerAddress, artId)), DeleteEntry(keyArtTags(ownerAddress, artId)), DeleteEntry(keyArtMaxMint(ownerAddress, artId)), DeleteEntry(keyArtSignID(ownerAddress, artId)), DeleteEntry(keyArtIssued(ownerAddress, artId)), DeleteEntry(keyArtOnSale(ownerAddress, artId)), StringEntry("last_invoke_id", id)] | |
374 | 376 | } | |
375 | 377 | ||
376 | 378 | ||
377 | 379 | ||
378 | 380 | @Callable(invoke) | |
379 | 381 | func sellArtwork (hash,price) = { | |
380 | 382 | let id = toBase58String(invoke.transactionId) | |
381 | 383 | let callerAddress = toBase58String(invoke.caller.bytes) | |
382 | 384 | let entryDate = lastBlock.timestamp | |
383 | 385 | let entryID = getStringByKey(((hash + "_") + callerAddress)) | |
384 | 386 | if (!(isDefined(entryID))) | |
385 | 387 | then throw("This artwork doesn't exit or you are not the owner") | |
386 | 388 | else { | |
387 | 389 | let userIsRegistered = getStringByKey(("user_status_" + callerAddress)) | |
388 | 390 | if ((userIsRegistered == "")) | |
389 | 391 | then throw("Please register this account first") | |
390 | 392 | else { | |
391 | 393 | let amountSold = getIntegerByKey(((("art_issued_" + entryID) + "_") + callerAddress)) | |
392 | 394 | let maxCanSell = getIntegerByKey(((("art_maxmint_" + entryID) + "_") + callerAddress)) | |
393 | 395 | if ((amountSold == maxCanSell)) | |
394 | 396 | then throw("You reached the max edition allowed to sell for this edition.") | |
395 | 397 | else if ((userIsRegistered == userSuspended)) | |
396 | 398 | then throw("Your account is suspended") | |
397 | 399 | else if (!(isDefined(entryID))) | |
398 | 400 | then throw("This artwork desn't exist") | |
399 | 401 | else if ((size(hash) != 64)) | |
400 | 402 | then throw("This hash is incorrect.") | |
401 | 403 | else { | |
402 | 404 | let sellStatus = if ((price > 0)) | |
403 | 405 | then true | |
404 | 406 | else false | |
405 | 407 | [BooleanEntry(((("art_onsale_" + entryID) + "_") + callerAddress), sellStatus), IntegerEntry(((("art_price_" + entryID) + "_") + callerAddress), price), StringEntry("last_invoke_id", id)] | |
406 | 408 | } | |
407 | 409 | } | |
408 | 410 | } | |
409 | 411 | } | |
410 | 412 | ||
411 | 413 | ||
412 | 414 | ||
413 | 415 | @Callable(invoke) | |
414 | 416 | func buyArtwork (hash,issuer) = { | |
415 | 417 | let id = toBase58String(invoke.transactionId) | |
416 | 418 | let callerAddress = toBase58String(invoke.caller.bytes) | |
417 | 419 | let totalNFT = getIntegerByKey("total_nft_issued") | |
418 | 420 | let entryID = getStringByKey(((hash + "_") + issuer)) | |
419 | 421 | if ((entryID == "")) | |
420 | 422 | then throw("This artwork doesn't exit or you are not the owner") | |
421 | 423 | else { | |
422 | 424 | let userIsRegistered = getStringByKey(("user_status_" + callerAddress)) | |
423 | 425 | if (!(isDefined(userIsRegistered))) | |
424 | 426 | then throw("Please register this account first") | |
425 | 427 | else { | |
426 | 428 | let alreadySoldList = getStringByKey(((("art_sold_" + entryID) + "_") + issuer)) | |
427 | 429 | let amountSold = getIntegerByKey(((("art_issued_" + entryID) + "_") + issuer)) | |
428 | 430 | let artworkPrice = getIntegerByKey(((("art_price_" + entryID) + "_") + issuer)) | |
429 | 431 | if ((artworkPrice == 0)) | |
430 | 432 | then throw("This artwork is not for sell") | |
431 | 433 | else { | |
432 | 434 | let maxCanSell = getIntegerByKey(((("art_maxmint_" + entryID) + "_") + issuer)) | |
433 | 435 | let payment = value(invoke.payments[0]) | |
434 | 436 | let amount = value(payment.amount) | |
435 | 437 | let assetId = if (isDefined(payment.assetId)) | |
436 | 438 | then throw("Only Waves token accepted at the moment") | |
437 | 439 | else unit | |
438 | 440 | if ((amountSold == maxCanSell)) | |
439 | 441 | then throw("Cannot buy this artwork anymore") | |
440 | 442 | else if ((artworkPrice != amount)) | |
441 | 443 | then throw("Payment don't match seller price") | |
442 | 444 | else { | |
443 | 445 | let newAmountSold = (amountSold + 1) | |
444 | 446 | let entryDate = lastBlock.timestamp | |
445 | 447 | let issueMeta = (((((((((((((("{\"version\": 1,\"artID\": \"" + entryID) + "\",\"maxIssuable\": \"") + toString(maxCanSell)) + "\",\"signID\": \"SA_") + toString((totalNFT + 1))) + "\", \"creator\": \"") + issuer) + "\", \"issue\": \"") + toString(newAmountSold)) + "/") + toString(maxCanSell)) + "\", \"hash\": ") + hash) + "}") | |
446 | 448 | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
447 | 449 | let idNFT = calculateAssetId(issueNFT) | |
448 | 450 | let sellStatus = if ((newAmountSold == maxCanSell)) | |
449 | 451 | then false | |
450 | 452 | else true | |
451 | 453 | [IntegerEntry(((("art_issued_" + entryID) + "_") + issuer), newAmountSold), StringEntry(((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + entryID) + "_") + issuer), ((((((callerAddress + "_") + toString(entryDate)) + "_") + id) + "_") + toString(artworkPrice))), IntegerEntry("total_nft_issued", (totalNFT + 1)), StringEntry("last_invoke_id", id), issueNFT, BooleanEntry(((("art_onsale_" + entryID) + "_") + callerAddress), sellStatus), ScriptTransfer(Address(fromBase58String(issuer)), amount, assetId), ScriptTransfer(invoke.caller, 1, idNFT)] | |
452 | 454 | } | |
453 | 455 | } | |
454 | 456 | } | |
455 | 457 | } | |
456 | 458 | } | |
457 | 459 | ||
458 | 460 |
github/deemru/w8io/169f3d6 69.08 ms ◑