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