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