tx · EU8Ct34qHoDypMj3LK5QiPzB8KsdMKMkNMp1GGnPv3jd

3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj:  -0.01100000 Waves

2023.01.21 04:32 [2414083] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves

{ "type": 13, "id": "EU8Ct34qHoDypMj3LK5QiPzB8KsdMKMkNMp1GGnPv3jd", "fee": 1100000, "feeAssetId": null, "timestamp": 1674264793240, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "2DZF7eYa8Dzq83ywqmqsKvnZDbG3tKnwvW7eTVhfgKdt6xe1wuqhNA2yeeAvTEp3M72gnsoZQdXQ45RStMa7Les4" ], "script": "base64:BgJMCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgUKAwgICBIDCgEIEgYKBAgIAQESBAoCCAgSAwoBCCgAB1ZFUlNJT04CAzEuNQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0Qm9vbGVhbkJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJsIAgUEdGhpcwUDa2V5BwEPZ2V0SW50ZWdlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAAABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnABJ3aGl0ZWxpc3RlZG9ubHlLZXkCFWNvbmZfd2hpdGVsaXN0ZWRfb25seQALZGFwcFJ1bm5p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1YmxpY0tleQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleZxI4Bc=", "height": 2414083, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9coC7PKpTkXWApoTZJZG5etZnBGWWCgJD87aHaQcNAc5 Next: CbYwjsTygDWathmSHVkbxufgAwsnpdCvxuVYH6pifXxQ Diff:
OldNewDifferences
385385 @Verifier(tx)
386386 func verifier () = match tx {
387387 case inv: InvokeScriptTransaction =>
388- if (if (if ((inv.function == "registerUser"))
388+ if (if (if (if ((inv.function == "registerUser"))
389389 then (inv.dApp == this)
390390 else false)
391391 then (inv.fee == 500000)
392392 else false)
393+ then (inv.feeAssetId == unit)
394+ else false)
393395 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5])))
394- else if (if (if ((inv.function == "updateUser"))
396+ else if (if (if (if ((inv.function == "updateUser"))
395397 then (inv.dApp == this)
396398 else false)
397399 then (inv.fee == 500000)
398400 else false)
401+ then (inv.feeAssetId == unit)
402+ else false)
399403 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5])))
400- else if (if (if ((inv.function == "setERC20User"))
404+ else if (if (if (if ((inv.function == "setERC20User"))
401405 then (inv.dApp == this)
402406 else false)
403407 then (inv.fee == 500000)
408+ else false)
409+ then (inv.feeAssetId == unit)
404410 else false)
405411 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[2])))
406412 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VERSION = "1.5"
55
66 func getStringByKey (key) = valueOrElse(getString(this, key), "")
77
88
99 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
1010
1111
1212 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
1313
1414
1515 let chris = getStringByKey("conf_admin_1")
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 whitelistDapp = value(addressFromString(getStringByKey("conf_whitelist_dapp")))
3030
3131 let userAllowed = "ALLOWED"
3232
3333 let userRegistered = "REGISTERED"
3434
3535 let userVerified = "VERIFIED"
3636
3737 let userSuspended = "SUSPENDED"
3838
3939 let userRemoved = "REMOVED"
4040
4141 let userChangeRequired = "CHANGE_REQUIRED"
4242
4343 let userUnregistered = "UNREGISTERED"
4444
4545 let userReset = "RESET"
4646
4747 func keyUserAddr (caller) = ("user_" + caller)
4848
4949
5050 func keyUserName (caller) = ("user_name_" + caller)
5151
5252
5353 func keyUserDesc (caller) = ("user_desc_" + caller)
5454
5555
5656 func keyUserSocial (caller) = ("user_social_" + caller)
5757
5858
5959 func keyUserThumb (caller) = ("user_thumb_" + caller)
6060
6161
6262 func keyUserStatus (caller) = ("user_status_" + caller)
6363
6464
6565 func keyUserRoyalties (caller) = ("user_royalties_" + caller)
6666
6767
6868 func keyUserDate (caller) = ("user_date_" + caller)
6969
7070
7171 func keyUserERC20 (caller) = ("user_ERC20_" + caller)
7272
7373
7474 func keyArtistAgentAddr (artistAddr) = ("artist_agent_" + artistAddr)
7575
7676
7777 func keyAgentArtistAddr (agentAddr,artistAddr) = ((("agent_" + agentAddr) + "_") + artistAddr)
7878
7979
8080 func keyPrimaryShare (artistAddr) = ("artist_agent_primary_" + artistAddr)
8181
8282
8383 func keySecondaryShare (artistAddr) = ("artist_agent_secondary_" + artistAddr)
8484
8585
8686 func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0)
8787
8888
8989 func validateCID (cid) = if (contains(cid, "/"))
9090 then if (if ((76 > size(cid)))
9191 then (size(split(cid, "/")[0]) == 59)
9292 else false)
9393 then (16 > size(split(cid, "/")[1]))
9494 else false
9595 else false
9696
9797
9898 func validUserData (caller,name,description,thumb,isAnUpdate) = {
9999 let validCID = if ((size(thumb) != 0))
100100 then validateCID(thumb)
101101 else true
102102 if (!(validCID))
103103 then throw("CID don't match requirement!")
104104 else if (if ((name == ""))
105105 then true
106106 else (description == ""))
107107 then throw("Name and description cannot be empty")
108108 else if ((size(description) > 600))
109109 then throw("600 Char. max description")
110110 else if ((size(name) > 45))
111111 then throw("45 Char. max name")
112112 else {
113113 let status = getStringByKey(keyUserStatus(caller))
114114 if (if ((status == userSuspended))
115115 then true
116116 else (status == userRemoved))
117117 then throw("Account suspended/ removed.")
118118 else if (if (!(isAnUpdate))
119119 then (status == userRegistered)
120120 else false)
121121 then throw("Already registered")
122122 else if (if (if (!(isAnUpdate))
123123 then (status == "")
124124 else false)
125125 then whitelistedonly
126126 else false)
127127 then throw("Can't register, get approved first.")
128128 else if (if (if (isAnUpdate)
129129 then (status == "")
130130 else false)
131131 then true
132132 else if (isAnUpdate)
133133 then (status == userAllowed)
134134 else false)
135135 then throw("Register first")
136136 else true
137137 }
138138 }
139139
140140
141141 func validateNewStatus (status,address,currentStatus) = {
142142 let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired]
143143 let statusToSet = if (containsElement(allStatus, status))
144144 then status
145145 else if (if ((status == userReset))
146146 then (currentStatus == userAllowed)
147147 else false)
148148 then ""
149149 else throw("Unknown status")
150150 let userIsRegistered = getIntegerByKey(keyUserDate(address))
151151 if (if ((userIsRegistered == 0))
152152 then (statusToSet != userAllowed)
153153 else false)
154154 then throw("You cant set this status, user is not registered.")
155155 else if (if ((currentStatus == userAllowed))
156156 then (statusToSet == userAllowed)
157157 else false)
158158 then throw("User already allowed")
159159 else if (if ((currentStatus == userRegistered))
160160 then (statusToSet == userAllowed)
161161 else false)
162162 then throw("User already allowed & registered")
163163 else if (if ((currentStatus == userVerified))
164164 then (statusToSet == userAllowed)
165165 else false)
166166 then throw("User already allowed & verified")
167167 else statusToSet
168168 }
169169
170170
171171 func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}")
172172
173173
174174 func asString (bv) = match bv {
175175 case bv0: String =>
176176 bv0
177177 case _ =>
178178 throw("Sponsored Public Key String expected")
179179 }
180180
181181
182182 func getCaller (i,pubKey) = {
183183 let isSponsored = if ((pubKey != ""))
184184 then valueOrElse(checkWhitelist((toString(addressFromPublicKey(fromBase58String(pubKey))) + "_free_txs")), 0)
185185 else 0
186186 let caller = if (if (if ((toBase58String(i.caller.bytes) == toString(this)))
187187 then (size(i.payments) == 0)
188188 else false)
189189 then (isSponsored > 0)
190190 else false)
191191 then toString(addressFromPublicKey(fromBase58String(pubKey)))
192192 else toBase58String(i.caller.bytes)
193193 let get_sponsored_waves = if ((pubKey != ""))
194194 then invoke(whitelistDapp, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(pubKey)))], nil)
195195 else unit
196196 if ((get_sponsored_waves == get_sponsored_waves))
197197 then $Tuple2(caller, (isSponsored > 0))
198198 else throw("Strict value is not equal to itself.")
199199 }
200200
201201
202202 @Callable(invoke)
203203 func setConf (key,val) = {
204204 let caller = toString(invoke.caller)
205205 if (containsElement([chris, toString(this)], caller))
206206 then [StringEntry(key, val)]
207207 else throw("You are not allowed to change this")
208208 }
209209
210210
211211
212212 @Callable(invoke)
213213 func appRunning (isLive,message) = {
214214 let caller = toString(invoke.caller)
215215 if (containsElement([chris, toString(this)], caller))
216216 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
217217 else throw("You are not allowed to change this")
218218 }
219219
220220
221221
222222 @Callable(invoke)
223223 func registrationMode (WLonly) = {
224224 let caller = toString(invoke.caller)
225225 if (containsElement([chris, toString(this)], caller))
226226 then [BooleanEntry(whitelistedonlyKey, WLonly)]
227227 else throw("You are not allowed to change this")
228228 }
229229
230230
231231
232232 @Callable(invoke)
233233 func registerUser (name,description,thumb,social,royalties,pubKey) = if (!(dappRunning))
234234 then throw(maintenanceMSG)
235235 else {
236236 let $t073057357 = getCaller(invoke, pubKey)
237237 let caller = $t073057357._1
238238 let isSponsored = $t073057357._2
239239 let id = toBase58String(invoke.transactionId)
240240 let timestamp = lastBlock.timestamp
241241 if (!(validUserData(caller, name, description, thumb, false)))
242242 then throw("Something went wrong")
243243 else {
244244 let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp))
245245 if (if ((0 > royalties))
246246 then true
247247 else (royalties > 1000))
248248 then throw("Royalties cannot be less than 0% or higher than 10%")
249249 else {
250250 let txToCaller = if (isSponsored)
251251 then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
252252 else nil
253253 ([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), IntegerEntry(keyUserRoyalties(caller), royalties), DeleteEntry(("ALLOWED_" + caller)), StringEntry(((userRegistered + "_") + caller), json)] ++ txToCaller)
254254 }
255255 }
256256 }
257257
258258
259259
260260 @Callable(invoke)
261261 func updateUser (name,description,thumb,social,royalties,pubKey) = if (!(dappRunning))
262262 then throw(maintenanceMSG)
263263 else {
264264 let $t088008904 = getCaller(invoke, pubKey)
265265 let caller = $t088008904._1
266266 let isSponsored = $t088008904._2
267267 let status = getStringByKey(keyUserStatus(caller))
268268 if (!(validUserData(caller, name, description, thumb, true)))
269269 then throw("Something went wrong")
270270 else {
271271 let date = getIntegerByKey(keyUserDate(caller))
272272 let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date))
273273 if (if ((0 > royalties))
274274 then true
275275 else (royalties > 1000))
276276 then throw("Royalties cannot be less than 0% or higher than 10%")
277277 else {
278278 let txToCaller = if (isSponsored)
279279 then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
280280 else nil
281281 ([StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), IntegerEntry(keyUserRoyalties(caller), royalties), StringEntry(((status + "_") + caller), json)] ++ txToCaller)
282282 }
283283 }
284284 }
285285
286286
287287
288288 @Callable(invoke)
289289 func setERC20User (erc20,pubKey) = if (!(dappRunning))
290290 then throw(maintenanceMSG)
291291 else {
292292 let $t01009110194 = getCaller(invoke, pubKey)
293293 let caller = $t01009110194._1
294294 let isSponsored = $t01009110194._2
295295 let status = getStringByKey(keyUserStatus(caller))
296296 if (if ((status != userRegistered))
297297 then (status != userVerified)
298298 else false)
299299 then throw("Not allowed to set ERC20 address")
300300 else {
301301 let firstTwo = take(erc20, 2)
302302 if (if ((firstTwo != "0x"))
303303 then true
304304 else (size(erc20) != 42))
305305 then throw("This is not an erc20 address")
306306 else {
307307 let txToCaller = if (isSponsored)
308308 then [ScriptTransfer(Address(fromBase58String(caller)), 0, unit)]
309309 else nil
310310 ([StringEntry(keyUserERC20(caller), erc20)] ++ txToCaller)
311311 }
312312 }
313313 }
314314
315315
316316
317317 @Callable(invoke)
318318 func changeUserStatus (address,status,note) = {
319319 let caller = toString(invoke.caller)
320320 let currentStatus = getStringByKey(keyUserStatus(address))
321321 let statusToSet = validateNewStatus(status, address, currentStatus)
322322 let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
323323 let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address))))
324324 let date = getIntegerByKey(keyUserDate(address))
325325 let json = makeJSON(name, thumb, toString(date))
326326 if (containsElement([chris, toString(this)], caller))
327327 then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)]
328328 else throw("Not allowed to change user status")
329329 }
330330
331331
332332
333333 @Callable(invoke)
334334 func deleteUser (address) = {
335335 let caller = toString(invoke.caller)
336336 let currentStatus = getStringByKey(keyUserStatus(address))
337337 if (containsElement([chris, toString(this)], caller))
338338 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)), DeleteEntry(keyUserRoyalties(address)), StringEntry(keyUserStatus(address), userRemoved)]
339339 else throw("Not allowed")
340340 }
341341
342342
343343
344344 @Callable(i)
345345 func setAgent (artistAddr,agentAddr,primaryShare,secondaryShare) = if (!(dappRunning))
346346 then throw(maintenanceMSG)
347347 else {
348348 let caller = toString(i.caller)
349349 if (containsElement([chris, toString(this)], caller))
350350 then if (if ((size(artistAddr) != 35))
351351 then true
352352 else (size(agentAddr) != 35))
353353 then throw("Wrong address")
354354 else [StringEntry(keyArtistAgentAddr(artistAddr), agentAddr), StringEntry(keyAgentArtistAddr(agentAddr, artistAddr), artistAddr), IntegerEntry(keyPrimaryShare(artistAddr), primaryShare), IntegerEntry(keySecondaryShare(artistAddr), secondaryShare)]
355355 else throw("You are not allowed")
356356 }
357357
358358
359359
360360 @Callable(i)
361361 func unsetAgent (artistAddr,agentAddr) = if (!(dappRunning))
362362 then throw(maintenanceMSG)
363363 else {
364364 let caller = toString(i.caller)
365365 if (containsElement([chris, toString(this)], caller))
366366 then if (if ((size(artistAddr) != 35))
367367 then true
368368 else (size(agentAddr) != 35))
369369 then throw("Wrong address")
370370 else [DeleteEntry(keyArtistAgentAddr(artistAddr)), DeleteEntry(keyAgentArtistAddr(agentAddr, artistAddr)), DeleteEntry(keyPrimaryShare(artistAddr)), DeleteEntry(keySecondaryShare(artistAddr))]
371371 else throw("You are not allowed")
372372 }
373373
374374
375375
376376 @Callable(i)
377377 func deleteEntry (entry) = {
378378 let caller = toString(i.caller)
379379 if ((caller == chris))
380380 then [DeleteEntry(entry)]
381381 else throw("no")
382382 }
383383
384384
385385 @Verifier(tx)
386386 func verifier () = match tx {
387387 case inv: InvokeScriptTransaction =>
388- if (if (if ((inv.function == "registerUser"))
388+ if (if (if (if ((inv.function == "registerUser"))
389389 then (inv.dApp == this)
390390 else false)
391391 then (inv.fee == 500000)
392392 else false)
393+ then (inv.feeAssetId == unit)
394+ else false)
393395 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5])))
394- else if (if (if ((inv.function == "updateUser"))
396+ else if (if (if (if ((inv.function == "updateUser"))
395397 then (inv.dApp == this)
396398 else false)
397399 then (inv.fee == 500000)
398400 else false)
401+ then (inv.feeAssetId == unit)
402+ else false)
399403 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5])))
400- else if (if (if ((inv.function == "setERC20User"))
404+ else if (if (if (if ((inv.function == "setERC20User"))
401405 then (inv.dApp == this)
402406 else false)
403407 then (inv.fee == 500000)
408+ else false)
409+ then (inv.feeAssetId == unit)
404410 else false)
405411 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[2])))
406412 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
407413 case _ =>
408414 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
409415 }
410416

github/deemru/w8io/026f985 
69.14 ms