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