tx · YxELNNFpBc1VEu98A8CDtmEYPumSKjCJWvy8czQQEwd

3MsFG8FxT6jH4cyiUeDR2H1VWdJWs1Zs8hu:  -0.01000000 Waves

2021.10.01 10:56 [1726859] smart account 3MsFG8FxT6jH4cyiUeDR2H1VWdJWs1Zs8hu > SELF 0.00000000 Waves

{ "type": 13, "id": "YxELNNFpBc1VEu98A8CDtmEYPumSKjCJWvy8czQQEwd", "fee": 1000000, "feeAssetId": null, "timestamp": 1633075072572, "version": 2, "chainId": 84, "sender": "3MsFG8FxT6jH4cyiUeDR2H1VWdJWs1Zs8hu", "senderPublicKey": "9KU1tS2Yt4a38THiA1UpFWypsGtm22eGgfm3iwbUshtV", "proofs": [ "2vPZhoHjHywAC1urvPm3HRhaguQUjBnpEhQFYWpS7FvbBWsTKHfPmMV64wmcqyJgPCsb71SrYR9EkNHDDuywExFs" ], "script": "base64:AAIFAAAAAAAAACoIAhIECgIECBIDCgEEEgcKBQgICAgIEgYKBAgICAgSBQoDCAgIEgMKAQgAAAAfAAAAAAlvcmFjbGVGZWUJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM01wWlFqekdvZ21pZmNFS2U4bURkNnJpYkw3bnhUOUFDeWUAAAAABm93bmVycwkABEwAAAACCQAEHQAAAAIFAAAACW9yYWNsZUZlZQIAAAAGb3duZXIxCQAETAAAAAIJAAQdAAAAAgUAAAAJb3JhY2xlRmVlAgAAAAZvd25lcjIFAAAAA25pbAAAAAAOZGFwcFJ1bm5pbmdLZXkCAAAAFGNvbmZfZGFwcF9pc19ydW5uaW5nAAAAABFtYWludGVuYW5jZU1TR0tleQIAAAAUY29uZl9tYWludGVuYW5jZV9tc2cAAAAAEndoaXRlbGlzdGVkb25seUtleQIAAAAVY29uZl93aGl0ZWxpc3RlZF9vbmx5AAAAAAtkYXBwUnVubmluZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAR0aGlzBQAAAA5kYXBwUnVubmluZ0tleQYAAAAADm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AAAznyRpQ==", "height": 1726859, "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 validateBanner (cid) = if ((size(cid) == 0))
76+ then true
77+ else if ((size(cid) == 46))
78+ then true
79+ else false
80+
81+
82+func validUserData (caller,name,description,thumb,isAnUpdate) = {
83+ let validCID = if ((size(thumb) != 0))
84+ then validateCID(thumb)
85+ else true
86+ if (!(validCID))
87+ then throw("CID don't match requirement!")
88+ else if (if ((name == ""))
89+ then true
90+ else (description == ""))
91+ then throw("Name and description cannot be empty")
92+ else if ((size(description) > 600))
93+ then throw("600 Char. max description")
94+ else if ((size(name) > 45))
95+ then throw("45 Char. max name")
96+ else {
97+ let status = getStringByKey(keyUserStatus(caller))
98+ if (if ((status == userSuspended))
99+ then true
100+ else (status == userRemoved))
101+ then throw("Account suspended/ removed.")
102+ else if (if (!(isAnUpdate))
103+ then (status == userRegistered)
104+ else false)
105+ then throw("Already registered")
106+ else if (if (if (!(isAnUpdate))
107+ then (status == "")
108+ else false)
109+ then whitelistedonly
110+ else false)
111+ then throw("Can't register, get approved first.")
112+ else if (if (if (isAnUpdate)
113+ then (status == "")
114+ else false)
115+ then true
116+ else if (isAnUpdate)
117+ then (status == userAllowed)
118+ else false)
119+ then throw("Register first")
120+ else true
121+ }
122+ }
123+
124+
125+func validateNewStatus (status,address,currentStatus) = {
126+ let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired]
127+ let statusToSet = if (containsElement(allStatus, status))
128+ then status
129+ else if (if ((status == userReset))
130+ then (currentStatus == userAllowed)
131+ else false)
132+ then ""
133+ else throw("Unknown status")
134+ let userIsRegistered = getIntegerByKey(keyUserDate(address))
135+ if (if ((userIsRegistered == 0))
136+ then (statusToSet != userAllowed)
137+ else false)
138+ then throw("You cant set this status, user is not registered.")
139+ else if (if ((currentStatus == userAllowed))
140+ then (statusToSet == userAllowed)
141+ else false)
142+ then throw("User already allowed")
143+ else if (if ((currentStatus == userRegistered))
144+ then (statusToSet == userAllowed)
145+ else false)
146+ then throw("User already allowed & registered")
147+ else if (if ((currentStatus == userVerified))
148+ then (statusToSet == userAllowed)
149+ else false)
150+ then throw("User already allowed & verified")
151+ else statusToSet
152+ }
153+
154+
155+func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}")
156+
157+
158+@Callable(invoke)
159+func appRunning (isLive,message) = {
160+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
161+ let id = toBase58String(invoke.transactionId)
162+ if (containsElement((owners :+ toString(this)), caller))
163+ then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
164+ else throw("You are not allowed to change this")
165+ }
166+
167+
168+
169+@Callable(invoke)
170+func registrationMode (WLonly) = {
171+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
172+ let id = toBase58String(invoke.transactionId)
173+ if (containsElement((owners :+ toString(this)), caller))
174+ then [BooleanEntry(whitelistedonlyKey, WLonly)]
175+ else throw("You are not allowed to change this")
176+ }
177+
178+
179+
180+@Callable(invoke)
181+func registerUser (name,description,thumb,social,banner) = if (!(dappRunning))
182+ then throw(maintenanceMSG)
183+ else {
184+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
185+ let id = toBase58String(invoke.transactionId)
186+ let timestamp = lastBlock.timestamp
187+ if (!(validateBanner(banner)))
188+ then throw("Invalid banner image!")
189+ else if (!(validUserData(caller, name, description, thumb, false)))
190+ then throw("Something went wrong")
191+ else {
192+ let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp))
193+[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)]
194+ }
195+ }
196+
197+
198+
199+@Callable(invoke)
200+func updateUser (name,description,thumb,social) = if (!(dappRunning))
201+ then throw(maintenanceMSG)
202+ else {
203+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
204+ let id = toBase58String(invoke.transactionId)
205+ let status = getStringByKey(keyUserStatus(caller))
206+ if (!(validUserData(caller, name, description, thumb, true)))
207+ then throw("Something went wrong")
208+ else {
209+ let date = getIntegerByKey(keyUserDate(caller))
210+ let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date))
211+[StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), StringEntry(((status + "_") + caller), json)]
212+ }
213+ }
214+
215+
216+
217+@Callable(invoke)
218+func changeUserStatus (address,status,note) = {
219+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
220+ let id = toBase58String(invoke.transactionId)
221+ let addr = addressFromString(address)
222+ match addr {
223+ case addr: Address =>
224+ let currentStatus = getStringByKey(keyUserStatus(address))
225+ let statusToSet = validateNewStatus(status, address, currentStatus)
226+ let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
227+ let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address))))
228+ let date = getIntegerByKey(keyUserDate(address))
229+ let json = makeJSON(name, thumb, toString(date))
230+ if (containsElement((owners :+ toString(this)), caller))
231+ then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)]
232+ else throw("Not allowed to change user status")
233+ case _ =>
234+ throw("Seems to be an invalid address!")
235+ }
236+ }
237+
238+
239+
240+@Callable(invoke)
241+func deleteUser (address) = {
242+ let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
243+ let id = toBase58String(invoke.transactionId)
244+ let currentStatus = getStringByKey(keyUserStatus(address))
245+ if (containsElement((owners :+ toString(this)), caller))
246+ 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)]
247+ else throw("Not allowed")
248+ }
249+
250+

github/deemru/w8io/026f985 
24.34 ms