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