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