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