tx · DTrBuRmU2KR2B2T4fiJ5K3s9mFqiGxTUd3rPczM1CBoQ 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.00900000 Waves 2022.11.29 06:58 [2337885] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "DTrBuRmU2KR2B2T4fiJ5K3s9mFqiGxTUd3rPczM1CBoQ", "fee": 900000, "feeAssetId": null, "timestamp": 1669694384259, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "j95FoLmanMXqwztokMgc55UF8dnv3XV3QGpQEhH7Xi27SBWtpCGw1pbHmYfFuEtx78KyGrGTCknzuxUgRY5QTWR" ], "script": "base64:BgJJCAISBAoCCAgSBAoCBAgSAwoBBBIHCgUICAgIARIHCgUICAgIARIDCgEIEgUKAwgICBIDCgEIEgYKBAgIAQESBAoCCAgSAwoBCCEBDmdldFN0cmluZ0J5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUDa2V5AgABD2dldEludGVnZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMFA2tleQAAAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl9hZG1pbl8xAA5kYXBwUnVubmluZ0tleQIUY29uZl9kYXBwX2lzX3J1bm5pbmcAEW1haW50ZW5hbmNlTVNHS2V5AhRjb25mX21haW50ZW5hbmNlX21zZwASd2hpdGVsaXN0ZWRvbmx5S2V5AhVjb25mX3doaXRlbGlzdGVkX29ubHkAC2RhcHBSdW5uaW5nCQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMFDmRhcHBSdW5uaW5nS2V5BgAObWFpbnRlbmFuY2VNU0cJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwUR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nkBCQESa2V5QXJ0aXN0QWdlbnRBZGRyAQUKYXJ0aXN0QWRkcgkAzAgCCQELRGVsZXRlRW50cnkBCQESa2V5QWdlbnRBcnRpc3RBZGRyAgUJYWdlbnRBZGRyBQphcnRpc3RBZGRyCQDMCAIJAQtEZWxldGVFbnRyeQEJAQ9rZXlQcmltYXJ5U2hhcmUBBQphcnRpc3RBZGRyCQDMCAIJAQtEZWxldGVFbnRyeQEJARFrZXlTZWNvbmRhcnlTaGFyZQEFCmFydGlzdEFkZHIFA25pbAkAAgECE1lvdSBhcmUgbm90IGFsbG93ZWQBaQELZGVsZXRlRW50cnkBBWVudHJ5BAZjYWxsZXIJAKUIAQgFAWkGY2FsbGVyAwkAAAIFBmNhbGxlcgUFY2hyaXMJAMwIAgkBC0RlbGV0ZUVudHJ5AQUFZW50cnkFA25pbAkAAgECAm5vAJ2Y5VQ=", "height": 2337885, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F4RSPHEbHDvXFiC7VWiNmhStweFGXEvv58zavLriWHY1 Next: 7E44s33V8Pvz4bnzcSKnSmKUzXRks6uweCd1U1Uh633T Diff:
Old | New | Differences | |
---|---|---|---|
202 | 202 | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp)) | |
203 | 203 | if (if ((0 > royalties)) | |
204 | 204 | then true | |
205 | - | else (royalties > | |
205 | + | else (royalties > 1000)) | |
206 | 206 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
207 | 207 | else [IntegerEntry(keyUserDate(caller), timestamp), StringEntry(keyUserAddr(caller), ((id + "_") + toString(timestamp))), StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), StringEntry(keyUserStatus(caller), userRegistered), IntegerEntry(keyUserRoyalties(caller), royalties), DeleteEntry(("ALLOWED_" + caller)), StringEntry(((userRegistered + "_") + caller), json)] | |
208 | 208 | } | |
224 | 224 | let royaltiesbase10With2Decimals = royalties | |
225 | 225 | if (if ((0 > royalties)) | |
226 | 226 | then true | |
227 | - | else (royalties > | |
227 | + | else (royalties > 1000)) | |
228 | 228 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
229 | 229 | else [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), IntegerEntry(keyUserRoyalties(caller), royalties), StringEntry(((status + "_") + caller), json)] | |
230 | 230 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | let chris = getStringByKey("conf_admin_1") | |
11 | 11 | ||
12 | 12 | let dappRunningKey = "conf_dapp_is_running" | |
13 | 13 | ||
14 | 14 | let maintenanceMSGKey = "conf_maintenance_msg" | |
15 | 15 | ||
16 | 16 | let whitelistedonlyKey = "conf_whitelisted_only" | |
17 | 17 | ||
18 | 18 | let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true) | |
19 | 19 | ||
20 | 20 | let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "") | |
21 | 21 | ||
22 | 22 | let whitelistedonly = valueOrElse(getBoolean(this, whitelistedonlyKey), true) | |
23 | 23 | ||
24 | 24 | let userAllowed = "ALLOWED" | |
25 | 25 | ||
26 | 26 | let userRegistered = "REGISTERED" | |
27 | 27 | ||
28 | 28 | let userVerified = "VERIFIED" | |
29 | 29 | ||
30 | 30 | let userSuspended = "SUSPENDED" | |
31 | 31 | ||
32 | 32 | let userRemoved = "REMOVED" | |
33 | 33 | ||
34 | 34 | let userChangeRequired = "CHANGE_REQUIRED" | |
35 | 35 | ||
36 | 36 | let userReset = "RESET" | |
37 | 37 | ||
38 | 38 | func keyUserAddr (caller) = ("user_" + caller) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func keyUserName (caller) = ("user_name_" + caller) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyUserDesc (caller) = ("user_desc_" + caller) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyUserSocial (caller) = ("user_social_" + caller) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyUserThumb (caller) = ("user_thumb_" + caller) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyUserStatus (caller) = ("user_status_" + caller) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func keyUserRoyalties (caller) = ("user_royalties_" + caller) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func keyUserDate (caller) = ("user_date_" + caller) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func keyUserERC20 (caller) = ("user_ERC20_" + caller) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func keyAgentArtistAddr (agentAddr,artistAddr) = ((("agent_" + agentAddr) + "_") + artistAddr) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func keyPrimaryShare (artistAddr) = ("artist_agent_primary_" + artistAddr) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func keySecondaryShare (artistAddr) = ("artist_agent_secondary_" + artistAddr) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func validateCID (cid) = if (contains(cid, "/")) | |
78 | 78 | then if (if ((76 > size(cid))) | |
79 | 79 | then (size(split(cid, "/")[0]) == 59) | |
80 | 80 | else false) | |
81 | 81 | then (16 > size(split(cid, "/")[1])) | |
82 | 82 | else false | |
83 | 83 | else false | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func validUserData (caller,name,description,thumb,isAnUpdate) = { | |
87 | 87 | let validCID = if ((size(thumb) != 0)) | |
88 | 88 | then validateCID(thumb) | |
89 | 89 | else true | |
90 | 90 | if (!(validCID)) | |
91 | 91 | then throw("CID don't match requirement!") | |
92 | 92 | else if (if ((name == "")) | |
93 | 93 | then true | |
94 | 94 | else (description == "")) | |
95 | 95 | then throw("Name and description cannot be empty") | |
96 | 96 | else if ((size(description) > 600)) | |
97 | 97 | then throw("600 Char. max description") | |
98 | 98 | else if ((size(name) > 45)) | |
99 | 99 | then throw("45 Char. max name") | |
100 | 100 | else { | |
101 | 101 | let status = getStringByKey(keyUserStatus(caller)) | |
102 | 102 | if (if ((status == userSuspended)) | |
103 | 103 | then true | |
104 | 104 | else (status == userRemoved)) | |
105 | 105 | then throw("Account suspended/ removed.") | |
106 | 106 | else if (if (!(isAnUpdate)) | |
107 | 107 | then (status == userRegistered) | |
108 | 108 | else false) | |
109 | 109 | then throw("Already registered") | |
110 | 110 | else if (if (if (!(isAnUpdate)) | |
111 | 111 | then (status == "") | |
112 | 112 | else false) | |
113 | 113 | then whitelistedonly | |
114 | 114 | else false) | |
115 | 115 | then throw("Can't register, get approved first.") | |
116 | 116 | else if (if (if (isAnUpdate) | |
117 | 117 | then (status == "") | |
118 | 118 | else false) | |
119 | 119 | then true | |
120 | 120 | else if (isAnUpdate) | |
121 | 121 | then (status == userAllowed) | |
122 | 122 | else false) | |
123 | 123 | then throw("Register first") | |
124 | 124 | else true | |
125 | 125 | } | |
126 | 126 | } | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func validateNewStatus (status,address,currentStatus) = { | |
130 | 130 | let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired] | |
131 | 131 | let statusToSet = if (containsElement(allStatus, status)) | |
132 | 132 | then status | |
133 | 133 | else if (if ((status == userReset)) | |
134 | 134 | then (currentStatus == userAllowed) | |
135 | 135 | else false) | |
136 | 136 | then "" | |
137 | 137 | else throw("Unknown status") | |
138 | 138 | let userIsRegistered = getIntegerByKey(keyUserDate(address)) | |
139 | 139 | if (if ((userIsRegistered == 0)) | |
140 | 140 | then (statusToSet != userAllowed) | |
141 | 141 | else false) | |
142 | 142 | then throw("You cant set this status, user is not registered.") | |
143 | 143 | else if (if ((currentStatus == userAllowed)) | |
144 | 144 | then (statusToSet == userAllowed) | |
145 | 145 | else false) | |
146 | 146 | then throw("User already allowed") | |
147 | 147 | else if (if ((currentStatus == userRegistered)) | |
148 | 148 | then (statusToSet == userAllowed) | |
149 | 149 | else false) | |
150 | 150 | then throw("User already allowed & registered") | |
151 | 151 | else if (if ((currentStatus == userVerified)) | |
152 | 152 | then (statusToSet == userAllowed) | |
153 | 153 | else false) | |
154 | 154 | then throw("User already allowed & verified") | |
155 | 155 | else statusToSet | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}") | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | @Callable(invoke) | |
163 | 163 | func setConf (key,val) = { | |
164 | 164 | let caller = toString(invoke.caller) | |
165 | 165 | if (containsElement([chris, toString(this)], caller)) | |
166 | 166 | then [StringEntry(key, val)] | |
167 | 167 | else throw("You are not allowed to change this") | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | ||
172 | 172 | @Callable(invoke) | |
173 | 173 | func appRunning (isLive,message) = { | |
174 | 174 | let caller = toString(invoke.caller) | |
175 | 175 | if (containsElement([chris, toString(this)], caller)) | |
176 | 176 | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
177 | 177 | else throw("You are not allowed to change this") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | ||
182 | 182 | @Callable(invoke) | |
183 | 183 | func registrationMode (WLonly) = { | |
184 | 184 | let caller = toString(invoke.caller) | |
185 | 185 | if (containsElement([chris, toString(this)], caller)) | |
186 | 186 | then [BooleanEntry(whitelistedonlyKey, WLonly)] | |
187 | 187 | else throw("You are not allowed to change this") | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | ||
192 | 192 | @Callable(invoke) | |
193 | 193 | func registerUser (name,description,thumb,social,royalties) = if (!(dappRunning)) | |
194 | 194 | then throw(maintenanceMSG) | |
195 | 195 | else { | |
196 | 196 | let caller = toString(invoke.caller) | |
197 | 197 | let id = toBase58String(invoke.transactionId) | |
198 | 198 | let timestamp = lastBlock.timestamp | |
199 | 199 | if (!(validUserData(caller, name, description, thumb, false))) | |
200 | 200 | then throw("Something went wrong") | |
201 | 201 | else { | |
202 | 202 | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp)) | |
203 | 203 | if (if ((0 > royalties)) | |
204 | 204 | then true | |
205 | - | else (royalties > | |
205 | + | else (royalties > 1000)) | |
206 | 206 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
207 | 207 | else [IntegerEntry(keyUserDate(caller), timestamp), StringEntry(keyUserAddr(caller), ((id + "_") + toString(timestamp))), StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), StringEntry(keyUserStatus(caller), userRegistered), IntegerEntry(keyUserRoyalties(caller), royalties), DeleteEntry(("ALLOWED_" + caller)), StringEntry(((userRegistered + "_") + caller), json)] | |
208 | 208 | } | |
209 | 209 | } | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | ||
213 | 213 | @Callable(invoke) | |
214 | 214 | func updateUser (name,description,thumb,social,royalties) = if (!(dappRunning)) | |
215 | 215 | then throw(maintenanceMSG) | |
216 | 216 | else { | |
217 | 217 | let caller = toString(invoke.caller) | |
218 | 218 | let status = getStringByKey(keyUserStatus(caller)) | |
219 | 219 | if (!(validUserData(caller, name, description, thumb, true))) | |
220 | 220 | then throw("Something went wrong") | |
221 | 221 | else { | |
222 | 222 | let date = getIntegerByKey(keyUserDate(caller)) | |
223 | 223 | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date)) | |
224 | 224 | let royaltiesbase10With2Decimals = royalties | |
225 | 225 | if (if ((0 > royalties)) | |
226 | 226 | then true | |
227 | - | else (royalties > | |
227 | + | else (royalties > 1000)) | |
228 | 228 | then throw("Royalties cannot be less than 0% or higher than 10%") | |
229 | 229 | else [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), IntegerEntry(keyUserRoyalties(caller), royalties), StringEntry(((status + "_") + caller), json)] | |
230 | 230 | } | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | ||
235 | 235 | @Callable(invoke) | |
236 | 236 | func setERC20User (erc20) = if (!(dappRunning)) | |
237 | 237 | then throw(maintenanceMSG) | |
238 | 238 | else { | |
239 | 239 | let caller = toString(invoke.caller) | |
240 | 240 | let status = getStringByKey(keyUserStatus(caller)) | |
241 | 241 | if (if ((status != userRegistered)) | |
242 | 242 | then (status != userVerified) | |
243 | 243 | else false) | |
244 | 244 | then throw("Not allowed to set ERC20 address") | |
245 | 245 | else { | |
246 | 246 | let firstTwo = take(erc20, 2) | |
247 | 247 | if (if ((firstTwo != "0x")) | |
248 | 248 | then true | |
249 | 249 | else (size(erc20) != 42)) | |
250 | 250 | then throw("This is not an erc20 address") | |
251 | 251 | else [StringEntry(keyUserERC20(caller), erc20)] | |
252 | 252 | } | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | ||
257 | 257 | @Callable(invoke) | |
258 | 258 | func changeUserStatus (address,status,note) = { | |
259 | 259 | let caller = toString(invoke.caller) | |
260 | 260 | let currentStatus = getStringByKey(keyUserStatus(address)) | |
261 | 261 | let statusToSet = validateNewStatus(status, address, currentStatus) | |
262 | 262 | let name = toBase64String(toBytes(getStringByKey(keyUserName(address)))) | |
263 | 263 | let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address)))) | |
264 | 264 | let date = getIntegerByKey(keyUserDate(address)) | |
265 | 265 | let json = makeJSON(name, thumb, toString(date)) | |
266 | 266 | if (containsElement([chris, toString(this)], caller)) | |
267 | 267 | then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)] | |
268 | 268 | else throw("Not allowed to change user status") | |
269 | 269 | } | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | ||
273 | 273 | @Callable(invoke) | |
274 | 274 | func deleteUser (address) = { | |
275 | 275 | let caller = toString(invoke.caller) | |
276 | 276 | let currentStatus = getStringByKey(keyUserStatus(address)) | |
277 | 277 | if (containsElement([chris, toString(this)], caller)) | |
278 | 278 | then [DeleteEntry(keyUserDate(address)), DeleteEntry(keyUserAddr(address)), DeleteEntry(keyUserName(address)), DeleteEntry(keyUserDesc(address)), DeleteEntry(keyUserSocial(address)), DeleteEntry(keyUserThumb(address)), DeleteEntry(("user_note_" + address)), DeleteEntry(((currentStatus + "_") + address)), DeleteEntry(keyUserRoyalties(address)), StringEntry(keyUserStatus(address), userRemoved)] | |
279 | 279 | else throw("Not allowed") | |
280 | 280 | } | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | ||
284 | 284 | @Callable(i) | |
285 | 285 | func setAgent (artistAddr,agentAddr,primaryShare,secondaryShare) = if (!(dappRunning)) | |
286 | 286 | then throw(maintenanceMSG) | |
287 | 287 | else { | |
288 | 288 | let caller = toString(i.caller) | |
289 | 289 | if (containsElement([chris, toString(this)], caller)) | |
290 | 290 | then if (if ((size(artistAddr) != 35)) | |
291 | 291 | then true | |
292 | 292 | else (size(agentAddr) != 35)) | |
293 | 293 | then throw("Wrong address") | |
294 | 294 | else [StringEntry(keyArtistAgentAddr(artistAddr), agentAddr), StringEntry(keyAgentArtistAddr(agentAddr, artistAddr), artistAddr), IntegerEntry(keyPrimaryShare(artistAddr), primaryShare), IntegerEntry(keySecondaryShare(artistAddr), secondaryShare)] | |
295 | 295 | else throw("You are not allowed") | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | ||
300 | 300 | @Callable(i) | |
301 | 301 | func unsetAgent (artistAddr,agentAddr) = if (!(dappRunning)) | |
302 | 302 | then throw(maintenanceMSG) | |
303 | 303 | else { | |
304 | 304 | let caller = toString(i.caller) | |
305 | 305 | if (containsElement([chris, toString(this)], caller)) | |
306 | 306 | then if (if ((size(artistAddr) != 35)) | |
307 | 307 | then true | |
308 | 308 | else (size(agentAddr) != 35)) | |
309 | 309 | then throw("Wrong address") | |
310 | 310 | else [DeleteEntry(keyArtistAgentAddr(artistAddr)), DeleteEntry(keyAgentArtistAddr(agentAddr, artistAddr)), DeleteEntry(keyPrimaryShare(artistAddr)), DeleteEntry(keySecondaryShare(artistAddr))] | |
311 | 311 | else throw("You are not allowed") | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | ||
316 | 316 | @Callable(i) | |
317 | 317 | func deleteEntry (entry) = { | |
318 | 318 | let caller = toString(i.caller) | |
319 | 319 | if ((caller == chris)) | |
320 | 320 | then [DeleteEntry(entry)] | |
321 | 321 | else throw("no") | |
322 | 322 | } | |
323 | 323 | ||
324 | 324 |
github/deemru/w8io/169f3d6 36.47 ms ◑