tx · 7VvjKR43iNJ2oR7qfK1QWW6UYkXdgw2npTms9yFGTVqE

3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj:  -0.01400000 Waves

2022.07.14 07:17 [2138900] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves

{ "type": 13, "id": "7VvjKR43iNJ2oR7qfK1QWW6UYkXdgw2npTms9yFGTVqE", "fee": 1400000, "feeAssetId": null, "timestamp": 1657772338816, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "21AUMYtUxzb6VXRvtXvnVM25pqNCR4bp4Gi8AnTXEa15JJvAR3z9zhnP1xsoTP679xuYfev9NFRGXbuPsq1DqmWA" ], "script": "base64:BgJCCAISBAoCCAgSBAoCBAgSAwoBBBIGCgQICAgIEgYKBAgICAgSBQoDCAgIEgMKAQgSBgoECAgBARIECgIICBIDCgEIIgEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0Qm9vbGVhbkJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJsIAgUEdGhpcwUDa2V5BwEPZ2V0SW50ZWdlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAAABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEABGpvZXAJAQ5nZXRTdHJpbmdCeUtleQECDGNvbmZfYWRtaW5fMgAOZGFwcFJ1bm5pbmdLZXkCFGNvbmZfZGFwcF9pc19ydW5uaW5nABFtYWludGVuYW5jZU1TR0tleQIUY29uZl9tYWludGVuYW5jZV9tc2cAEndoaXRlbGlzdGVkb25seUtleQIVY29uZl93aGl0ZWxpc3RlZF9vbmx5AAtkYXBw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HIAIwkAAgECDVdyb25nIGFkZHJlc3MJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBEmtleUFydGlzdEFnZW50QWRkcgEFCmFydGlzdEFkZHIJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBEmtleUFnZW50QXJ0aXN0QWRkcgIFCWFnZW50QWRkcgUKYXJ0aXN0QWRkcgkAzAgCCQELRGVsZXRlRW50cnkBCQEPa2V5UHJpbWFyeVNoYXJlAQUKYXJ0aXN0QWRkcgkAzAgCCQELRGVsZXRlRW50cnkBCQERa2V5U2Vjb25kYXJ5U2hhcmUBBQphcnRpc3RBZGRyBQNuaWwJAAIBAhNZb3UgYXJlIG5vdCBhbGxvd2VkAWkBC2RlbGV0ZUVudHJ5AQVlbnRyeQQGY2FsbGVyCQClCAEIBQFpBmNhbGxlcgMJAAACBQZjYWxsZXIFBWNocmlzCQDMCAIJAQtEZWxldGVFbnRyeQEFBWVudHJ5BQNuaWwJAAIBAgJubwBhiidd", "height": 2138900, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BuuECFZiZfu31aEQ3SDFVaLcsPRULEyzgusFZQt2pV56 Next: GaiULeiCDAS8SWmUtza53bX4UZvoF2Pd7gyjUzj1FyJG Diff:
OldNewDifferences
1212
1313 let chris = getStringByKey("conf_admin_1")
1414
15-let joep = getStringByKey("conf_admin_21")
15+let joep = getStringByKey("conf_admin_2")
1616
1717 let dappRunningKey = "conf_dapp_is_running"
1818
173173 @Callable(invoke)
174174 func appRunning (isLive,message) = {
175175 let caller = toString(invoke.caller)
176- let id = toBase58String(invoke.transactionId)
177176 if (containsElement([chris, joep, toString(this)], caller))
178177 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
179178 else throw("You are not allowed to change this")
184183 @Callable(invoke)
185184 func registrationMode (WLonly) = {
186185 let caller = toString(invoke.caller)
187- let id = toBase58String(invoke.transactionId)
188186 if (containsElement([chris, toString(this)], caller))
189187 then [BooleanEntry(whitelistedonlyKey, WLonly)]
190188 else throw("You are not allowed to change this")
214212 then throw(maintenanceMSG)
215213 else {
216214 let caller = toString(invoke.caller)
217- let id = toBase58String(invoke.transactionId)
218215 let status = getStringByKey(keyUserStatus(caller))
219216 if (!(validUserData(caller, name, description, thumb, true)))
220217 then throw("Something went wrong")
230227 @Callable(invoke)
231228 func changeUserStatus (address,status,note) = {
232229 let caller = toString(invoke.caller)
233- let id = toBase58String(invoke.transactionId)
234230 let currentStatus = getStringByKey(keyUserStatus(address))
235231 let statusToSet = validateNewStatus(status, address, currentStatus)
236232 let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
247243 @Callable(invoke)
248244 func deleteUser (address) = {
249245 let caller = toString(invoke.caller)
250- let id = toBase58String(invoke.transactionId)
251246 let currentStatus = getStringByKey(keyUserStatus(address))
252247 if (containsElement([chris, toString(this)], caller))
253248 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)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStringByKey (key) = valueOrElse(getString(this, key), "")
55
66
77 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
88
99
1010 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
1111
1212
1313 let chris = getStringByKey("conf_admin_1")
1414
15-let joep = getStringByKey("conf_admin_21")
15+let joep = getStringByKey("conf_admin_2")
1616
1717 let dappRunningKey = "conf_dapp_is_running"
1818
1919 let maintenanceMSGKey = "conf_maintenance_msg"
2020
2121 let whitelistedonlyKey = "conf_whitelisted_only"
2222
2323 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
2424
2525 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
2626
2727 let whitelistedonly = valueOrElse(getBoolean(this, whitelistedonlyKey), true)
2828
2929 let userAllowed = "ALLOWED"
3030
3131 let userRegistered = "REGISTERED"
3232
3333 let userVerified = "VERIFIED"
3434
3535 let userSuspended = "SUSPENDED"
3636
3737 let userRemoved = "REMOVED"
3838
3939 let userChangeRequired = "CHANGE_REQUIRED"
4040
4141 let userUnregistered = "UNREGISTERED"
4242
4343 let userReset = "RESET"
4444
4545 func keyUserAddr (caller) = ("user_" + caller)
4646
4747
4848 func keyUserName (caller) = ("user_name_" + caller)
4949
5050
5151 func keyUserDesc (caller) = ("user_desc_" + caller)
5252
5353
5454 func keyUserSocial (caller) = ("user_social_" + caller)
5555
5656
5757 func keyUserThumb (caller) = ("user_thumb_" + caller)
5858
5959
6060 func keyUserStatus (caller) = ("user_status_" + caller)
6161
6262
6363 func keyUserDate (caller) = ("user_date_" + caller)
6464
6565
6666 func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
6767
6868
6969 func keyAgentArtistAddr (agentAddr,artistAddr) = ((("agent_" + agentAddr) + "_") + artistAddr)
7070
7171
7272 func keyPrimaryShare (artistAddr) = ("artist_agent_primary_" + artistAddr)
7373
7474
7575 func keySecondaryShare (artistAddr) = ("artist_agent_secondary_" + artistAddr)
7676
7777
7878 func validateCID (cid) = if (contains(cid, "/"))
7979 then if (if ((76 > size(cid)))
8080 then (size(split(cid, "/")[0]) == 59)
8181 else false)
8282 then (16 > size(split(cid, "/")[1]))
8383 else false
8484 else false
8585
8686
8787 func validUserData (caller,name,description,thumb,isAnUpdate) = {
8888 let validCID = if ((size(thumb) != 0))
8989 then validateCID(thumb)
9090 else true
9191 if (!(validCID))
9292 then throw("CID don't match requirement!")
9393 else if (if ((name == ""))
9494 then true
9595 else (description == ""))
9696 then throw("Name and description cannot be empty")
9797 else if ((size(description) > 600))
9898 then throw("600 Char. max description")
9999 else if ((size(name) > 45))
100100 then throw("45 Char. max name")
101101 else {
102102 let status = getStringByKey(keyUserStatus(caller))
103103 if (if ((status == userSuspended))
104104 then true
105105 else (status == userRemoved))
106106 then throw("Account suspended/ removed.")
107107 else if (if (!(isAnUpdate))
108108 then (status == userRegistered)
109109 else false)
110110 then throw("Already registered")
111111 else if (if (if (!(isAnUpdate))
112112 then (status == "")
113113 else false)
114114 then whitelistedonly
115115 else false)
116116 then throw("Can't register, get approved first.")
117117 else if (if (if (isAnUpdate)
118118 then (status == "")
119119 else false)
120120 then true
121121 else if (isAnUpdate)
122122 then (status == userAllowed)
123123 else false)
124124 then throw("Register first")
125125 else true
126126 }
127127 }
128128
129129
130130 func validateNewStatus (status,address,currentStatus) = {
131131 let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired]
132132 let statusToSet = if (containsElement(allStatus, status))
133133 then status
134134 else if (if ((status == userReset))
135135 then (currentStatus == userAllowed)
136136 else false)
137137 then ""
138138 else throw("Unknown status")
139139 let userIsRegistered = getIntegerByKey(keyUserDate(address))
140140 if (if ((userIsRegistered == 0))
141141 then (statusToSet != userAllowed)
142142 else false)
143143 then throw("You cant set this status, user is not registered.")
144144 else if (if ((currentStatus == userAllowed))
145145 then (statusToSet == userAllowed)
146146 else false)
147147 then throw("User already allowed")
148148 else if (if ((currentStatus == userRegistered))
149149 then (statusToSet == userAllowed)
150150 else false)
151151 then throw("User already allowed & registered")
152152 else if (if ((currentStatus == userVerified))
153153 then (statusToSet == userAllowed)
154154 else false)
155155 then throw("User already allowed & verified")
156156 else statusToSet
157157 }
158158
159159
160160 func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}")
161161
162162
163163 @Callable(invoke)
164164 func setConf (key,val) = {
165165 let caller = toString(invoke.caller)
166166 if (containsElement([chris, toString(this)], caller))
167167 then [StringEntry(key, val)]
168168 else throw("You are not allowed to change this")
169169 }
170170
171171
172172
173173 @Callable(invoke)
174174 func appRunning (isLive,message) = {
175175 let caller = toString(invoke.caller)
176- let id = toBase58String(invoke.transactionId)
177176 if (containsElement([chris, joep, toString(this)], caller))
178177 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
179178 else throw("You are not allowed to change this")
180179 }
181180
182181
183182
184183 @Callable(invoke)
185184 func registrationMode (WLonly) = {
186185 let caller = toString(invoke.caller)
187- let id = toBase58String(invoke.transactionId)
188186 if (containsElement([chris, toString(this)], caller))
189187 then [BooleanEntry(whitelistedonlyKey, WLonly)]
190188 else throw("You are not allowed to change this")
191189 }
192190
193191
194192
195193 @Callable(invoke)
196194 func registerUser (name,description,thumb,social) = if (!(dappRunning))
197195 then throw(maintenanceMSG)
198196 else {
199197 let caller = toString(invoke.caller)
200198 let id = toBase58String(invoke.transactionId)
201199 let timestamp = lastBlock.timestamp
202200 if (!(validUserData(caller, name, description, thumb, false)))
203201 then throw("Something went wrong")
204202 else {
205203 let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp))
206204 [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)]
207205 }
208206 }
209207
210208
211209
212210 @Callable(invoke)
213211 func updateUser (name,description,thumb,social) = if (!(dappRunning))
214212 then throw(maintenanceMSG)
215213 else {
216214 let caller = toString(invoke.caller)
217- let id = toBase58String(invoke.transactionId)
218215 let status = getStringByKey(keyUserStatus(caller))
219216 if (!(validUserData(caller, name, description, thumb, true)))
220217 then throw("Something went wrong")
221218 else {
222219 let date = getIntegerByKey(keyUserDate(caller))
223220 let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date))
224221 [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), StringEntry(((status + "_") + caller), json)]
225222 }
226223 }
227224
228225
229226
230227 @Callable(invoke)
231228 func changeUserStatus (address,status,note) = {
232229 let caller = toString(invoke.caller)
233- let id = toBase58String(invoke.transactionId)
234230 let currentStatus = getStringByKey(keyUserStatus(address))
235231 let statusToSet = validateNewStatus(status, address, currentStatus)
236232 let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
237233 let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address))))
238234 let date = getIntegerByKey(keyUserDate(address))
239235 let json = makeJSON(name, thumb, toString(date))
240236 if (containsElement([chris, joep, toString(this)], caller))
241237 then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)]
242238 else throw("Not allowed to change user status")
243239 }
244240
245241
246242
247243 @Callable(invoke)
248244 func deleteUser (address) = {
249245 let caller = toString(invoke.caller)
250- let id = toBase58String(invoke.transactionId)
251246 let currentStatus = getStringByKey(keyUserStatus(address))
252247 if (containsElement([chris, toString(this)], caller))
253248 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)]
254249 else throw("Not allowed")
255250 }
256251
257252
258253
259254 @Callable(i)
260255 func setAgent (artistAddr,agentAddr,primaryShare,secondaryShare) = if (!(dappRunning))
261256 then throw(maintenanceMSG)
262257 else {
263258 let caller = toString(i.caller)
264259 if (containsElement([chris, toString(this)], caller))
265260 then if (if ((size(artistAddr) != 35))
266261 then true
267262 else (size(agentAddr) != 35))
268263 then throw("Wrong address")
269264 else [StringEntry(keyArtistAgentAddr(artistAddr), agentAddr), StringEntry(keyAgentArtistAddr(agentAddr, artistAddr), artistAddr), IntegerEntry(keyPrimaryShare(artistAddr), primaryShare), IntegerEntry(keySecondaryShare(artistAddr), secondaryShare)]
270265 else throw("You are not allowed")
271266 }
272267
273268
274269
275270 @Callable(i)
276271 func unsetAgent (artistAddr,agentAddr) = if (!(dappRunning))
277272 then throw(maintenanceMSG)
278273 else {
279274 let caller = toString(i.caller)
280275 if (containsElement([chris, toString(this)], caller))
281276 then if (if ((size(artistAddr) != 35))
282277 then true
283278 else (size(agentAddr) != 35))
284279 then throw("Wrong address")
285280 else [DeleteEntry(keyArtistAgentAddr(artistAddr)), DeleteEntry(keyAgentArtistAddr(agentAddr, artistAddr)), DeleteEntry(keyPrimaryShare(artistAddr)), DeleteEntry(keySecondaryShare(artistAddr))]
286281 else throw("You are not allowed")
287282 }
288283
289284
290285
291286 @Callable(i)
292287 func deleteEntry (entry) = {
293288 let caller = toString(i.caller)
294289 if ((caller == chris))
295290 then [DeleteEntry(entry)]
296291 else throw("no")
297292 }
298293
299294

github/deemru/w8io/026f985 
43.39 ms