tx · 3YHRUcANtrH7KZzFBtboixMk47hpepQi2SA6ZYQwtEjP

3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj:  -0.01000000 Waves

2023.01.19 10:56 [2411536] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves

{ "type": 13, "id": "3YHRUcANtrH7KZzFBtboixMk47hpepQi2SA6ZYQwtEjP", "fee": 1000000, "feeAssetId": null, "timestamp": 1674115048939, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "3eiTUD2v71yvLZyQd2A8vSYSygVA9UBXhLQ2CtEgj3ynWrBjyynBEaRm6La7YdW2LRjyU6xhmu2AMzZ3KySocB3r" ], "script": "base64:BgJMCAISBAoCCAgSBAoCBAgSAwoBBBIICgYICAgIAQgSCAoGCAgICAEIEgQKAggIEgUKAwgICBIDCgEIEgYKBAgIAQESBAoCCAgSAwoBCCcAB1ZFUlNJT04CAzEuNQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0Qm9vbGVhbkJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJsIAgUEdGhpcwUDa2V5BwEPZ2V0SW50ZWdlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAAABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX2FkbWluXzEADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnABJ3aGl0ZWxpc3RlZG9ubHlLZXkCFWNvbmZfd2hpdGVsaXN0ZWRfb25seQALZGFwcFJ1bm5pbmcJAQ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APQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmmYg54", "height": 2411536, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HJuFQwm75ntfMjjBx4Fdx9BXxUQUDXZFZAXbwwnDbGpP Next: EAfspMPWvgSEhsDSTAVm9BiZPfFp5g4ELj7rc1Ur9Sb7 Diff:
OldNewDifferences
9292 else false
9393
9494
95-func validUserData (caller,name,description,thumb,isAnUpdate) = {
96- let validCID = if ((size(thumb) != 0))
97- then validateCID(thumb)
98- else true
99- if (!(validCID))
100- then throw("CID don't match requirement!")
101- else if (if ((name == ""))
102- then true
103- else (description == ""))
104- then throw("Name and description cannot be empty")
105- else if ((size(description) > 600))
106- then throw("600 Char. max description")
107- else if ((size(name) > 45))
108- then throw("45 Char. max name")
109- else {
110- let status = getStringByKey(keyUserStatus(caller))
111- if (if ((status == userSuspended))
112- then true
113- else (status == userRemoved))
114- then throw("Account suspended/ removed.")
115- else if (if (!(isAnUpdate))
116- then (status == userRegistered)
117- else false)
118- then throw("Already registered")
119- else if (if (if (!(isAnUpdate))
120- then (status == "")
95+func validUserData (caller,name,description,thumb,isAnUpdate) = if (true)
96+ then throw(caller)
97+ else {
98+ let validCID = if ((size(thumb) != 0))
99+ then validateCID(thumb)
100+ else true
101+ if (!(validCID))
102+ then throw("CID don't match requirement!")
103+ else if (if ((name == ""))
104+ then true
105+ else (description == ""))
106+ then throw("Name and description cannot be empty")
107+ else if ((size(description) > 600))
108+ then throw("600 Char. max description")
109+ else if ((size(name) > 45))
110+ then throw("45 Char. max name")
111+ else {
112+ let status = getStringByKey(keyUserStatus(caller))
113+ if (if ((status == userSuspended))
114+ then true
115+ else (status == userRemoved))
116+ then throw("Account suspended/ removed.")
117+ else if (if (!(isAnUpdate))
118+ then (status == userRegistered)
121119 else false)
122- then whitelistedonly
123- else false)
124- then throw("Can't register, get approved first.")
125- else if (if (if (isAnUpdate)
120+ then throw("Already registered")
121+ else if (if (if (!(isAnUpdate))
126122 then (status == "")
127123 else false)
128- then true
129- else if (isAnUpdate)
130- then (status == userAllowed)
124+ then whitelistedonly
125+ else false)
126+ then throw("Can't register, get approved first.")
127+ else if (if (if (isAnUpdate)
128+ then (status == "")
131129 else false)
132- then throw("Register first")
133- else true
134- }
135- }
130+ then true
131+ else if (isAnUpdate)
132+ then (status == userAllowed)
133+ else false)
134+ then throw("Register first")
135+ else true
136+ }
137+ }
136138
137139
138140 func validateNewStatus (status,address,currentStatus) = {
177179
178180
179181 func getCaller (i,pubKey) = {
180- let caller = if ((toBase58String(i.caller.bytes) == toString(this)))
182+ let caller = if (if ((toBase58String(i.caller.bytes) == toString(this)))
183+ then (size(i.payments) == 0)
184+ else false)
181185 then toString(addressFromPublicKey(fromBase58String(pubKey)))
182186 else toBase58String(i.caller.bytes)
183187 let get_sponsored_waves = if ((pubKey != ""))
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 validateCID (cid) = if (contains(cid, "/"))
8787 then if (if ((76 > size(cid)))
8888 then (size(split(cid, "/")[0]) == 59)
8989 else false)
9090 then (16 > size(split(cid, "/")[1]))
9191 else false
9292 else false
9393
9494
95-func validUserData (caller,name,description,thumb,isAnUpdate) = {
96- let validCID = if ((size(thumb) != 0))
97- then validateCID(thumb)
98- else true
99- if (!(validCID))
100- then throw("CID don't match requirement!")
101- else if (if ((name == ""))
102- then true
103- else (description == ""))
104- then throw("Name and description cannot be empty")
105- else if ((size(description) > 600))
106- then throw("600 Char. max description")
107- else if ((size(name) > 45))
108- then throw("45 Char. max name")
109- else {
110- let status = getStringByKey(keyUserStatus(caller))
111- if (if ((status == userSuspended))
112- then true
113- else (status == userRemoved))
114- then throw("Account suspended/ removed.")
115- else if (if (!(isAnUpdate))
116- then (status == userRegistered)
117- else false)
118- then throw("Already registered")
119- else if (if (if (!(isAnUpdate))
120- then (status == "")
95+func validUserData (caller,name,description,thumb,isAnUpdate) = if (true)
96+ then throw(caller)
97+ else {
98+ let validCID = if ((size(thumb) != 0))
99+ then validateCID(thumb)
100+ else true
101+ if (!(validCID))
102+ then throw("CID don't match requirement!")
103+ else if (if ((name == ""))
104+ then true
105+ else (description == ""))
106+ then throw("Name and description cannot be empty")
107+ else if ((size(description) > 600))
108+ then throw("600 Char. max description")
109+ else if ((size(name) > 45))
110+ then throw("45 Char. max name")
111+ else {
112+ let status = getStringByKey(keyUserStatus(caller))
113+ if (if ((status == userSuspended))
114+ then true
115+ else (status == userRemoved))
116+ then throw("Account suspended/ removed.")
117+ else if (if (!(isAnUpdate))
118+ then (status == userRegistered)
121119 else false)
122- then whitelistedonly
123- else false)
124- then throw("Can't register, get approved first.")
125- else if (if (if (isAnUpdate)
120+ then throw("Already registered")
121+ else if (if (if (!(isAnUpdate))
126122 then (status == "")
127123 else false)
128- then true
129- else if (isAnUpdate)
130- then (status == userAllowed)
124+ then whitelistedonly
125+ else false)
126+ then throw("Can't register, get approved first.")
127+ else if (if (if (isAnUpdate)
128+ then (status == "")
131129 else false)
132- then throw("Register first")
133- else true
134- }
135- }
130+ then true
131+ else if (isAnUpdate)
132+ then (status == userAllowed)
133+ else false)
134+ then throw("Register first")
135+ else true
136+ }
137+ }
136138
137139
138140 func validateNewStatus (status,address,currentStatus) = {
139141 let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired]
140142 let statusToSet = if (containsElement(allStatus, status))
141143 then status
142144 else if (if ((status == userReset))
143145 then (currentStatus == userAllowed)
144146 else false)
145147 then ""
146148 else throw("Unknown status")
147149 let userIsRegistered = getIntegerByKey(keyUserDate(address))
148150 if (if ((userIsRegistered == 0))
149151 then (statusToSet != userAllowed)
150152 else false)
151153 then throw("You cant set this status, user is not registered.")
152154 else if (if ((currentStatus == userAllowed))
153155 then (statusToSet == userAllowed)
154156 else false)
155157 then throw("User already allowed")
156158 else if (if ((currentStatus == userRegistered))
157159 then (statusToSet == userAllowed)
158160 else false)
159161 then throw("User already allowed & registered")
160162 else if (if ((currentStatus == userVerified))
161163 then (statusToSet == userAllowed)
162164 else false)
163165 then throw("User already allowed & verified")
164166 else statusToSet
165167 }
166168
167169
168170 func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}")
169171
170172
171173 func asString (bv) = match bv {
172174 case bv0: String =>
173175 bv0
174176 case _ =>
175177 throw("Sponsored Public Key String expected")
176178 }
177179
178180
179181 func getCaller (i,pubKey) = {
180- let caller = if ((toBase58String(i.caller.bytes) == toString(this)))
182+ let caller = if (if ((toBase58String(i.caller.bytes) == toString(this)))
183+ then (size(i.payments) == 0)
184+ else false)
181185 then toString(addressFromPublicKey(fromBase58String(pubKey)))
182186 else toBase58String(i.caller.bytes)
183187 let get_sponsored_waves = if ((pubKey != ""))
184188 then invoke(whitelistDapp, "useFreeTx", [toString(addressFromPublicKey(fromBase58String(pubKey)))], nil)
185189 else unit
186190 if ((get_sponsored_waves == get_sponsored_waves))
187191 then caller
188192 else throw("Strict value is not equal to itself.")
189193 }
190194
191195
192196 @Callable(invoke)
193197 func setConf (key,val) = {
194198 let caller = toString(invoke.caller)
195199 if (containsElement([chris, toString(this)], caller))
196200 then [StringEntry(key, val)]
197201 else throw("You are not allowed to change this")
198202 }
199203
200204
201205
202206 @Callable(invoke)
203207 func appRunning (isLive,message) = {
204208 let caller = toString(invoke.caller)
205209 if (containsElement([chris, toString(this)], caller))
206210 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
207211 else throw("You are not allowed to change this")
208212 }
209213
210214
211215
212216 @Callable(invoke)
213217 func registrationMode (WLonly) = {
214218 let caller = toString(invoke.caller)
215219 if (containsElement([chris, toString(this)], caller))
216220 then [BooleanEntry(whitelistedonlyKey, WLonly)]
217221 else throw("You are not allowed to change this")
218222 }
219223
220224
221225
222226 @Callable(invoke)
223227 func registerUser (name,description,thumb,social,royalties,pubKey) = if (!(dappRunning))
224228 then throw(maintenanceMSG)
225229 else {
226230 let caller = getCaller(invoke, pubKey)
227231 let id = toBase58String(invoke.transactionId)
228232 let timestamp = lastBlock.timestamp
229233 if (!(validUserData(caller, name, description, thumb, false)))
230234 then throw("Something went wrong")
231235 else {
232236 let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp))
233237 if (if ((0 > royalties))
234238 then true
235239 else (royalties > 1000))
236240 then throw("Royalties cannot be less than 0% or higher than 10%")
237241 else [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)]
238242 }
239243 }
240244
241245
242246
243247 @Callable(invoke)
244248 func updateUser (name,description,thumb,social,royalties,pubKey) = if (!(dappRunning))
245249 then throw(maintenanceMSG)
246250 else {
247251 let caller = getCaller(invoke, pubKey)
248252 let status = getStringByKey(keyUserStatus(caller))
249253 if (!(validUserData(caller, name, description, thumb, true)))
250254 then throw("Something went wrong")
251255 else {
252256 let date = getIntegerByKey(keyUserDate(caller))
253257 let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date))
254258 if (if ((0 > royalties))
255259 then true
256260 else (royalties > 1000))
257261 then throw("Royalties cannot be less than 0% or higher than 10%")
258262 else [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), IntegerEntry(keyUserRoyalties(caller), royalties), StringEntry(((status + "_") + caller), json)]
259263 }
260264 }
261265
262266
263267
264268 @Callable(invoke)
265269 func setERC20User (erc20,pubKey) = if (!(dappRunning))
266270 then throw(maintenanceMSG)
267271 else {
268272 let caller = getCaller(invoke, pubKey)
269273 let status = getStringByKey(keyUserStatus(caller))
270274 if (if ((status != userRegistered))
271275 then (status != userVerified)
272276 else false)
273277 then throw("Not allowed to set ERC20 address")
274278 else {
275279 let firstTwo = take(erc20, 2)
276280 if (if ((firstTwo != "0x"))
277281 then true
278282 else (size(erc20) != 42))
279283 then throw("This is not an erc20 address")
280284 else [StringEntry(keyUserERC20(caller), erc20)]
281285 }
282286 }
283287
284288
285289
286290 @Callable(invoke)
287291 func changeUserStatus (address,status,note) = {
288292 let caller = toString(invoke.caller)
289293 let currentStatus = getStringByKey(keyUserStatus(address))
290294 let statusToSet = validateNewStatus(status, address, currentStatus)
291295 let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
292296 let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address))))
293297 let date = getIntegerByKey(keyUserDate(address))
294298 let json = makeJSON(name, thumb, toString(date))
295299 if (containsElement([chris, toString(this)], caller))
296300 then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)]
297301 else throw("Not allowed to change user status")
298302 }
299303
300304
301305
302306 @Callable(invoke)
303307 func deleteUser (address) = {
304308 let caller = toString(invoke.caller)
305309 let currentStatus = getStringByKey(keyUserStatus(address))
306310 if (containsElement([chris, toString(this)], caller))
307311 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)]
308312 else throw("Not allowed")
309313 }
310314
311315
312316
313317 @Callable(i)
314318 func setAgent (artistAddr,agentAddr,primaryShare,secondaryShare) = if (!(dappRunning))
315319 then throw(maintenanceMSG)
316320 else {
317321 let caller = toString(i.caller)
318322 if (containsElement([chris, toString(this)], caller))
319323 then if (if ((size(artistAddr) != 35))
320324 then true
321325 else (size(agentAddr) != 35))
322326 then throw("Wrong address")
323327 else [StringEntry(keyArtistAgentAddr(artistAddr), agentAddr), StringEntry(keyAgentArtistAddr(agentAddr, artistAddr), artistAddr), IntegerEntry(keyPrimaryShare(artistAddr), primaryShare), IntegerEntry(keySecondaryShare(artistAddr), secondaryShare)]
324328 else throw("You are not allowed")
325329 }
326330
327331
328332
329333 @Callable(i)
330334 func unsetAgent (artistAddr,agentAddr) = if (!(dappRunning))
331335 then throw(maintenanceMSG)
332336 else {
333337 let caller = toString(i.caller)
334338 if (containsElement([chris, toString(this)], caller))
335339 then if (if ((size(artistAddr) != 35))
336340 then true
337341 else (size(agentAddr) != 35))
338342 then throw("Wrong address")
339343 else [DeleteEntry(keyArtistAgentAddr(artistAddr)), DeleteEntry(keyAgentArtistAddr(agentAddr, artistAddr)), DeleteEntry(keyPrimaryShare(artistAddr)), DeleteEntry(keySecondaryShare(artistAddr))]
340344 else throw("You are not allowed")
341345 }
342346
343347
344348
345349 @Callable(i)
346350 func deleteEntry (entry) = {
347351 let caller = toString(i.caller)
348352 if ((caller == chris))
349353 then [DeleteEntry(entry)]
350354 else throw("no")
351355 }
352356
353357
354358 @Verifier(tx)
355359 func verifier () = match tx {
356360 case inv: InvokeScriptTransaction =>
357361 if (if ((inv.function == "registerUser"))
358362 then (inv.dApp == this)
359363 else false)
360364 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[13])))
361365 else if (if ((inv.function == "updateUser"))
362366 then (inv.dApp == this)
363367 else false)
364368 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[12])))
365369 else if (if ((inv.function == "setERC20User"))
366370 then (inv.dApp == this)
367371 else false)
368372 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[5])))
369373 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
370374 case _ =>
371375 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
372376 }
373377

github/deemru/w8io/026f985 
81.91 ms