tx · 8EE3Tz2TFcmM5Xg5kg48zj9cppFnXGjVsUTViuavsYkg

3N2Vt1ik15zcSatxWzuGCbgYe9xfkmD7H4Q:  -0.01000000 Waves

2021.09.21 12:52 [1712659] smart account 3N2Vt1ik15zcSatxWzuGCbgYe9xfkmD7H4Q > SELF 0.00000000 Waves

{ "type": 13, "id": "8EE3Tz2TFcmM5Xg5kg48zj9cppFnXGjVsUTViuavsYkg", "fee": 1000000, "feeAssetId": null, "timestamp": 1632218024049, "version": 2, "chainId": 84, "sender": "3N2Vt1ik15zcSatxWzuGCbgYe9xfkmD7H4Q", "senderPublicKey": "3CJ7XCxM2JtGdeB9efzirS5vH7ardKtmrVmpipL1bWx7", "proofs": [ "2QgBQPyfwaaoZc55Gm8nTn4icFpoeR76FaZS8CsUV83T39GDgS4uQbHPM89MRHnzKL6tpxQETRf2m5jWnfGN1nA2" ], "script": "base64:AAIFAAAAAAAAACkIAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIFCgMICAgSAwoBCAAAAB4AAAAACW9yYWNsZUZlZQkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTXBaUWp6R29nbWlmY0VLZThtRGQ2cmliTDdueFQ5QUN5ZQAAAAAGb3duZXJzCQAETAAAAAIJAAQdAAAAAgUAAAAJb3JhY2xlRmVlAgAAAAZvd25lcjEJAARMAAAAAgkABB0AAAACBQAAAAlvcmFjbGVGZWUCAAAABm93bmVyMgUAAAADbmlsAAAAAA5kYXBwUnVubmluZ0tleQIAAAAUY29uZl9kYXBwX2lzX3J1bm5pbmcAAAAAEW1haW50ZW5hbmNlTVNHS2V5AgAAABRjb25mX21haW50ZW5hbmNlX21zZwAAAAASd2hpdGVsaXN0ZWRvbmx5S2V5AgAAABVjb25mX3doaXRlbGlzdGVkX29ubHkAAAAAC2RhcHBSdW5uaW5nCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAABHRoaXMFAAAADmRhcHBSdW5uaW5nS2V5BgAAAAAObW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AAAAPY29udGFpbnNFbGVtZW50AAAAAgkABE0AAAACBQAAAAZvd25lcnMJAAQlAAAAAQUAAAAEdGhpcwUAAAAGY2FsbGVyCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAtrZXlVc2VyRGF0ZQAAAAEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAC2tleVVzZXJBZGRyAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAALa2V5VXNlck5hbWUAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAtrZXlVc2VyRGVzYwAAAAEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAADWtleVVzZXJTb2NpYWwAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAxrZXlVc2VyVGh1bWIAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgkAASwAAAACBQAAAA1jdXJyZW50U3RhdHVzAgAAAAFfBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAA1rZXlVc2VyU3RhdHVzAAAAAQUAAAAHYWRkcmVzcwUAAAALdXNlclJlbW92ZWQFAAAAA25pbAkAAAIAAAABAgAAAAtOb3QgYWxsb3dlZAAAAAB7fiI2", "height": 1712659, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let oracleFee = value(addressFromString("3MpZQjzGogmifcEKe8mDd6ribL7nxT9ACye"))
5+
6+let owners = [getString(oracleFee, "owner1"), getString(oracleFee, "owner2")]
7+
8+let dappRunningKey = "conf_dapp_is_running"
9+
10+let maintenanceMSGKey = "conf_maintenance_msg"
11+
12+let whitelistedonlyKey = "conf_whitelisted_only"
13+
14+let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
15+
16+let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
17+
18+let whitelistedonly = valueOrElse(getBoolean(this, whitelistedonlyKey), true)
19+
20+let userAllowed = "ALLOWED"
21+
22+let userRegistered = "REGISTERED"
23+
24+let userVerified = "VERIFIED"
25+
26+let userSuspended = "SUSPENDED"
27+
28+let userRemoved = "REMOVED"
29+
30+let userChangeRequired = "CHANGE_REQUIRED"
31+
32+let userUnregistered = "UNREGISTERED"
33+
34+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+
45+func keyUserAddr (caller) = ("user_" + caller)
46+
47+
48+func keyUserName (caller) = ("user_name_" + caller)
49+
50+
51+func keyUserDesc (caller) = ("user_desc_" + caller)
52+
53+
54+func keyUserSocial (caller) = ("user_social_" + caller)
55+
56+
57+func keyUserThumb (caller) = ("user_thumb_" + caller)
58+
59+
60+func keyUserStatus (caller) = ("user_status_" + caller)
61+
62+
63+func keyUserDate (caller) = ("user_date_" + caller)
64+
65+
66+func validateCID (cid) = if (contains(cid, "/"))
67+ then if (if ((63 > size(cid)))
68+ then (size(split(cid, "/")[0]) == 46)
69+ else false)
70+ then (16 > size(split(cid, "/")[1]))
71+ else false
72+ else false
73+
74+
75+func validUserData (caller,name,description,thumb,isAnUpdate) = {
76+ let validCID = if ((size(thumb) != 0))
77+ then validateCID(thumb)
78+ else true
79+ if (!(validCID))
80+ then throw("CID don't match requirement!")
81+ else if (if ((name == ""))
82+ then true
83+ else (description == ""))
84+ then throw("Name and description cannot be empty")
85+ else if ((size(description) > 600))
86+ then throw("600 Char. max description")
87+ else if ((size(name) > 45))
88+ then throw("45 Char. max name")
89+ else {
90+ let status = getStringByKey(keyUserStatus(caller))
91+ if (if ((status == userSuspended))
92+ then true
93+ else (status == userRemoved))
94+ then throw("Account suspended/ removed.")
95+ else if (if (!(isAnUpdate))
96+ then (status == userRegistered)
97+ else false)
98+ then throw("Already registered")
99+ else if (if (if (!(isAnUpdate))
100+ then (status == "")
101+ else false)
102+ then whitelistedonly
103+ else false)
104+ then throw("Can't register, get approved first.")
105+ else if (if (if (isAnUpdate)
106+ then (status == "")
107+ else false)
108+ then true
109+ else if (isAnUpdate)
110+ then (status == userAllowed)
111+ else false)
112+ then throw("Register first")
113+ else true
114+ }
115+ }
116+
117+
118+func validateNewStatus (status,address,currentStatus) = {
119+ let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired]
120+ let statusToSet = if (containsElement(allStatus, status))
121+ then status
122+ else if (if ((status == userReset))
123+ then (currentStatus == userAllowed)
124+ else false)
125+ then ""
126+ else throw("Unknown status")
127+ let userIsRegistered = getIntegerByKey(keyUserDate(address))
128+ if (if ((userIsRegistered == 0))
129+ then (statusToSet != userAllowed)
130+ else false)
131+ then throw("You cant set this status, user is not registered.")
132+ else if (if ((currentStatus == userAllowed))
133+ then (statusToSet == userAllowed)
134+ else false)
135+ then throw("User already allowed")
136+ else if (if ((currentStatus == userRegistered))
137+ then (statusToSet == userAllowed)
138+ else false)
139+ then throw("User already allowed & registered")
140+ else if (if ((currentStatus == userVerified))
141+ then (statusToSet == userAllowed)
142+ else false)
143+ then throw("User already allowed & verified")
144+ else statusToSet
145+ }
146+
147+
148+func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}")
149+
150+
151+@Callable(invoke)
152+func appRunning (isLive,message) = {
153+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
154+ let id = toBase58String(invoke.transactionId)
155+ if (containsElement((owners :+ toString(this)), caller))
156+ then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
157+ else throw("You are not allowed to change this")
158+ }
159+
160+
161+
162+@Callable(invoke)
163+func registrationMode (WLonly) = {
164+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
165+ let id = toBase58String(invoke.transactionId)
166+ if (containsElement((owners :+ toString(this)), caller))
167+ then [BooleanEntry(whitelistedonlyKey, WLonly)]
168+ else throw("You are not allowed to change this")
169+ }
170+
171+
172+
173+@Callable(invoke)
174+func registerUser (name,description,thumb,social) = if (!(dappRunning))
175+ then throw(maintenanceMSG)
176+ else {
177+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
178+ let id = toBase58String(invoke.transactionId)
179+ let timestamp = lastBlock.timestamp
180+ if (!(validUserData(caller, name, description, thumb, false)))
181+ then throw("Something went wrong")
182+ else {
183+ let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp))
184+[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)]
185+ }
186+ }
187+
188+
189+
190+@Callable(invoke)
191+func updateUser (name,description,thumb,social) = if (!(dappRunning))
192+ then throw(maintenanceMSG)
193+ else {
194+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
195+ let id = toBase58String(invoke.transactionId)
196+ let status = getStringByKey(keyUserStatus(caller))
197+ if (!(validUserData(caller, name, description, thumb, true)))
198+ then throw("Something went wrong")
199+ else {
200+ let date = getIntegerByKey(keyUserDate(caller))
201+ let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date))
202+[StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), StringEntry(((status + "_") + caller), json)]
203+ }
204+ }
205+
206+
207+
208+@Callable(invoke)
209+func changeUserStatus (address,status,note) = {
210+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
211+ let id = toBase58String(invoke.transactionId)
212+ let addr = addressFromString(address)
213+ match addr {
214+ case addr: Address =>
215+ let currentStatus = getStringByKey(keyUserStatus(address))
216+ let statusToSet = validateNewStatus(status, address, currentStatus)
217+ let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
218+ let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address))))
219+ let date = getIntegerByKey(keyUserDate(address))
220+ let json = makeJSON(name, thumb, toString(date))
221+ if (containsElement((owners :+ toString(this)), caller))
222+ then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)]
223+ else throw("Not allowed to change user status")
224+ case _ =>
225+ throw("Seems to be an invalid address!")
226+ }
227+ }
228+
229+
230+
231+@Callable(invoke)
232+func deleteUser (address) = {
233+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
234+ let id = toBase58String(invoke.transactionId)
235+ let currentStatus = getStringByKey(keyUserStatus(address))
236+ if (containsElement((owners :+ toString(this)), caller))
237+ then [DeleteEntry(keyUserDate(address)), DeleteEntry(keyUserAddr(address)), DeleteEntry(keyUserName(address)), DeleteEntry(keyUserDesc(address)), DeleteEntry(keyUserSocial(address)), DeleteEntry(keyUserThumb(address)), DeleteEntry(((currentStatus + "_") + address)), StringEntry(keyUserStatus(address), userRemoved)]
238+ else throw("Not allowed")
239+ }
240+
241+

github/deemru/w8io/026f985 
29.51 ms