tx · CFQ3ZS7ubiDHhztWGPooDSXxzWC4raNBjxeZXR8Zezy4

3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj:  -0.01400000 Waves

2020.12.22 12:14 [1319716] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves

{ "type": 13, "id": "CFQ3ZS7ubiDHhztWGPooDSXxzWC4raNBjxeZXR8Zezy4", "fee": 1400000, "feeAssetId": null, "timestamp": 1608628378593, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "48nB4X3kqAwuEuJatFA9rxT2iZjdK4JCCw77tBLi3GH5YGviMZWefK3Hqhaz15GHs95BC3JcLR24ifYcLekUxQSv" ], "script": "base64:AAIEAAAAAAAAAC0IAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIECgIICBIDCgEIEgMKAQgAAAAcAAAAAAtzaWduQXNzZXRJZAEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresAAAAABWNocmlzAgAAACMzTXNHNmpQTkNyVkpVdFlCN1hKQnhTN3V0V3NYQWY0bjlWcAAAAAAEam9lcAIAAAAjM016bTRWTHdzTjl1WndiVE16UGozWHV4VjZrRWZBUjhVRE4AAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAABJ3aGl0ZWxpc3RlZG9ubHlLZXkCAAAAFWNvbmZfd2hpdGVsaXN0ZWRfb25seQAAAAALZGFwcFJ1bm5pbmcEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAAOZGFwcFJ1bm5pbmdLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2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EAAAALa2V5VXNlckRlc2MAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAA1rZXlVc2VyU29jaWFsAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMa2V5VXNlclRodW1iAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAEsAAAAAgUAAAANY3VycmVudFN0YXR1cwIAAAABXwUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAANa2V5VXNlclN0YXR1cwAAAAEFAAAAB2FkZHJlc3MFAAAAC3VzZXJSZW1vdmVkBQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAABaQEAAAALZGVsZXRlRW50cnkAAAABAAAABWVudHJ5BAAAAAZjYWxsZXIJAAQlAAAAAQkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkAAAAAAAACBQAAAAZjYWxsZXIFAAAABWNocmlzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAABWVudHJ5BQAAAANuaWwJAAACAAAAAQIAAAACbm8AAAAAcsOHYw==", "height": 1319716, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7LDLRphrwKGHuR855Q8mv5jLF2jKWEZ18ysDfEqu86LG Next: HRpFahxX4MSp2phhyKRQiBdHhVtNyifR1cXzgEYBfr6z Diff:
OldNewDifferences
210210 else false)
211211 then ""
212212 else throw("Unknown status")
213- if (if ((currentStatus == userAllowed))
214- then (status == userAllowed)
213+ let userIsRegistered = getIntegerByKey(keyUserDate(address))
214+ if (if ((userIsRegistered == 0))
215+ then (status != userAllowed)
215216 else false)
216- then throw("User already allowed")
217- else if (if ((currentStatus == userRegistered))
217+ then throw("You cant set this status, user is not registered.")
218+ else if (if ((currentStatus == userAllowed))
218219 then (status == userAllowed)
219220 else false)
220- then throw("User already allowed & registered")
221- else if (if ((currentStatus == userVerified))
221+ then throw("User already allowed")
222+ else if (if ((currentStatus == userRegistered))
222223 then (status == userAllowed)
223224 else false)
224- then throw("User already allowed & verified")
225- else {
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 = (((((((("{\"address\": \"" + address) + "\", \"name\": \"") + name) + "\", \"thumb\":\"") + thumb) + "\",\"date\":\"") + toString(date)) + "\"}")
230- if (containsElement([chris, joep, toString(this)], caller))
231- then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json)]
232- else throw("Not allowed to change user status")
233- }
225+ then throw("User already allowed & registered")
226+ else if (if ((currentStatus == userVerified))
227+ then (status == userAllowed)
228+ else false)
229+ then throw("User already allowed & verified")
230+ else {
231+ let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
232+ let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address))))
233+ let date = getIntegerByKey(keyUserDate(address))
234+ let json = (((((((("{\"address\": \"" + address) + "\", \"name\": \"") + name) + "\", \"thumb\":\"") + thumb) + "\",\"date\":\"") + toString(date)) + "\"}")
235+ if (containsElement([chris, joep, toString(this)], caller))
236+ then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json)]
237+ else throw("Not allowed to change user status")
238+ }
234239 }
235240
236241
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
55
66 let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
77
88 let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
99
1010 let dappRunningKey = "conf_dapp_is_running"
1111
1212 let maintenanceMSGKey = "conf_maintenance_msg"
1313
1414 let whitelistedonlyKey = "conf_whitelisted_only"
1515
1616 let dappRunning = match getBoolean(this, dappRunningKey) {
1717 case a: Boolean =>
1818 a
1919 case _ =>
2020 true
2121 }
2222
2323 let maintenanceMSG = match getString(this, maintenanceMSGKey) {
2424 case a: String =>
2525 a
2626 case _ =>
2727 ""
2828 }
2929
3030 let whitelistedonly = match getBoolean(this, whitelistedonlyKey) {
3131 case a: Boolean =>
3232 a
3333 case _ =>
3434 true
3535 }
3636
3737 let userAllowed = "ALLOWED"
3838
3939 let userRegistered = "REGISTERED"
4040
4141 let userVerified = "VERIFIED"
4242
4343 let userSuspended = "SUSPENDED"
4444
4545 let userRemoved = "REMOVED"
4646
4747 let userChangeRequired = "CHANGE_REQUIRED"
4848
4949 let userUnregistered = "UNREGISTERED"
5050
5151 let userReset = "RESET"
5252
5353 func getStringByKey (key) = match getString(this, key) {
5454 case a: String =>
5555 a
5656 case _ =>
5757 ""
5858 }
5959
6060
6161 func getBooleanByKey (key) = match getBoolean(this, key) {
6262 case a: Boolean =>
6363 a
6464 case _ =>
6565 false
6666 }
6767
6868
6969 func getIntegerByKey (key) = match getInteger(this, key) {
7070 case i: Int =>
7171 i
7272 case _ =>
7373 0
7474 }
7575
7676
7777 func validateCID (cid) = if (if ((75 > size(cid)))
7878 then (60 > size(split(cid, "/")[0]))
7979 else false)
8080 then (16 > size(split(cid, "/")[1]))
8181 else false
8282
8383
8484 func keyUserAddr (caller) = ("user_" + caller)
8585
8686
8787 func keyUserName (caller) = ("user_name_" + caller)
8888
8989
9090 func keyUserDesc (caller) = ("user_desc_" + caller)
9191
9292
9393 func keyUserSocial (caller) = ("user_social_" + caller)
9494
9595
9696 func keyUserThumb (caller) = ("user_thumb_" + caller)
9797
9898
9999 func keyUserStatus (caller) = ("user_status_" + caller)
100100
101101
102102 func keyUserDate (caller) = ("user_date_" + caller)
103103
104104
105105 @Callable(i)
106106 func appRunning (isLive,message) = {
107107 let caller = toString(addressFromPublicKey(i.callerPublicKey))
108108 let id = toBase58String(i.transactionId)
109109 if (containsElement([chris, joep, toString(this)], caller))
110110 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
111111 else throw("You are not allowed to change this")
112112 }
113113
114114
115115
116116 @Callable(i)
117117 func registrationMode (WLonly) = {
118118 let caller = toString(addressFromPublicKey(i.callerPublicKey))
119119 let id = toBase58String(i.transactionId)
120120 if (containsElement([chris, joep, toString(this)], caller))
121121 then [BooleanEntry(whitelistedonlyKey, WLonly)]
122122 else throw("You are not allowed to change this")
123123 }
124124
125125
126126
127127 @Callable(i)
128128 func registerUser (name,description,thumb,social) = if (!(dappRunning))
129129 then throw(maintenanceMSG)
130130 else {
131131 let caller = toString(addressFromPublicKey(i.callerPublicKey))
132132 let canRegister = getStringByKey(keyUserStatus(caller))
133133 let id = toBase58String(i.transactionId)
134134 let timestamp = lastBlock.timestamp
135135 if (if ((canRegister == userSuspended))
136136 then true
137137 else (canRegister == userRemoved))
138138 then throw("Account suspended/ removed.")
139139 else if ((canRegister == userRegistered))
140140 then throw("Already registered")
141141 else if (if ((canRegister == ""))
142142 then whitelistedonly
143143 else false)
144144 then throw("Can't register, get approved first.")
145145 else if (if ((name == ""))
146146 then true
147147 else (description == ""))
148148 then throw("Name and description cannot be empty")
149149 else if ((size(description) > 600))
150150 then throw("600 Char. max description")
151151 else if ((size(name) > 45))
152152 then throw("45 Char. max name")
153153 else {
154154 let json = (((((((("{\"address\": \"" + caller) + "\", \"name\": \"") + toBase64String(toBytes(name))) + "\", \"thumb\":\"") + toBase64String(toBytes(thumb))) + "\",\"date\":\"") + toString(timestamp)) + "\"}")
155155 [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)]
156156 }
157157 }
158158
159159
160160
161161 @Callable(i)
162162 func updateUser (name,description,thumb,social) = if (!(dappRunning))
163163 then throw(maintenanceMSG)
164164 else {
165165 let caller = toString(addressFromPublicKey(i.callerPublicKey))
166166 let id = toBase58String(i.transactionId)
167167 let canUpdate = getStringByKey(keyUserStatus(caller))
168168 if (if ((canUpdate == userSuspended))
169169 then true
170170 else (canUpdate == userRemoved))
171171 then throw("Account suspended/ removed.")
172172 else if (if ((canUpdate == ""))
173173 then true
174174 else (canUpdate == userAllowed))
175175 then throw("Register first")
176176 else if (if ((name == ""))
177177 then true
178178 else (description == ""))
179179 then throw("Name & description cannot be empty")
180180 else if ((size(description) > 600))
181181 then throw("600 Char. max for description")
182182 else if ((size(name) > 45))
183183 then throw("45 Char. max name")
184184 else [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb)]
185185 }
186186
187187
188188
189189 @Callable(i)
190190 func changeUserStatus (address,status) = if (!(dappRunning))
191191 then throw(maintenanceMSG)
192192 else {
193193 let caller = toString(addressFromPublicKey(i.callerPublicKey))
194194 let id = toBase58String(i.transactionId)
195195 let currentStatus = getStringByKey(keyUserStatus(address))
196196 let statusToSet = if ((status == userVerified))
197197 then userVerified
198198 else if ((status == userRegistered))
199199 then userRegistered
200200 else if ((status == userSuspended))
201201 then userSuspended
202202 else if ((status == userRemoved))
203203 then userRemoved
204204 else if ((status == userAllowed))
205205 then userAllowed
206206 else if ((status == userChangeRequired))
207207 then userChangeRequired
208208 else if (if ((status == userReset))
209209 then (currentStatus == userAllowed)
210210 else false)
211211 then ""
212212 else throw("Unknown status")
213- if (if ((currentStatus == userAllowed))
214- then (status == userAllowed)
213+ let userIsRegistered = getIntegerByKey(keyUserDate(address))
214+ if (if ((userIsRegistered == 0))
215+ then (status != userAllowed)
215216 else false)
216- then throw("User already allowed")
217- else if (if ((currentStatus == userRegistered))
217+ then throw("You cant set this status, user is not registered.")
218+ else if (if ((currentStatus == userAllowed))
218219 then (status == userAllowed)
219220 else false)
220- then throw("User already allowed & registered")
221- else if (if ((currentStatus == userVerified))
221+ then throw("User already allowed")
222+ else if (if ((currentStatus == userRegistered))
222223 then (status == userAllowed)
223224 else false)
224- then throw("User already allowed & verified")
225- else {
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 = (((((((("{\"address\": \"" + address) + "\", \"name\": \"") + name) + "\", \"thumb\":\"") + thumb) + "\",\"date\":\"") + toString(date)) + "\"}")
230- if (containsElement([chris, joep, toString(this)], caller))
231- then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json)]
232- else throw("Not allowed to change user status")
233- }
225+ then throw("User already allowed & registered")
226+ else if (if ((currentStatus == userVerified))
227+ then (status == userAllowed)
228+ else false)
229+ then throw("User already allowed & verified")
230+ else {
231+ let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
232+ let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address))))
233+ let date = getIntegerByKey(keyUserDate(address))
234+ let json = (((((((("{\"address\": \"" + address) + "\", \"name\": \"") + name) + "\", \"thumb\":\"") + thumb) + "\",\"date\":\"") + toString(date)) + "\"}")
235+ if (containsElement([chris, joep, toString(this)], caller))
236+ then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json)]
237+ else throw("Not allowed to change user status")
238+ }
234239 }
235240
236241
237242
238243 @Callable(i)
239244 func deleteUser (address) = {
240245 let caller = toString(addressFromPublicKey(i.callerPublicKey))
241246 let id = toBase58String(i.transactionId)
242247 let currentStatus = getStringByKey(keyUserStatus(address))
243248 if (containsElement([chris, toString(this)], caller))
244249 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)]
245250 else throw("Not allowed")
246251 }
247252
248253
249254
250255 @Callable(i)
251256 func deleteEntry (entry) = {
252257 let caller = toString(addressFromPublicKey(i.callerPublicKey))
253258 if ((caller == chris))
254259 then [DeleteEntry(entry)]
255260 else throw("no")
256261 }
257262
258263

github/deemru/w8io/026f985 
116.31 ms