tx · ETSUXDY4ZNVPFjznPzgXJvZTiyFACLB6J2FDZTojzHvE

3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj:  -0.01400000 Waves

2020.12.22 12:45 [1319748] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves

{ "type": 13, "id": "ETSUXDY4ZNVPFjznPzgXJvZTiyFACLB6J2FDZTojzHvE", "fee": 1400000, "feeAssetId": null, "timestamp": 1608630334696, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "5EvjmhT4aZqr1MJZeNvRbPX6YPKr6rgGtDiRG37y4BispPcLTboYc6E7L9JVHWbk47RpDswy9E9uGAun2totYhwd" ], "script": "base64:AAIEAAAAAAAAACgIAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIECgIICBIDCgEIAAAAHAAAAAALc2lnbkFzc2V0SWQBAAAAIOilarzKd0LycGEyNUpPRYO5uR7lmWcXw3Hq2QuhBK3rAAAAAAVjaHJpcwIAAAAjM01zRzZqUE5DclZKVXRZQjdYSkJ4Uzd1dFdzWEFmNG45VnAAAAAABGpvZXACAAAAIzNNem00Vkx3c045dVp3YlRNelBqM1h1eFY2a0VmQVI4VUROAAAAAA5kYXBwUnVubmluZ0tleQIAAAAUY29uZl9kYXBwX2lzX3J1bm5pbmcAAAAAEW1haW50ZW5hbmNlTVNHS2V5AgAAABRjb25mX21haW50ZW5hbmNlX21zZwAAAAASd2hpdGVsaXN0ZWRvbmx5S2V5AgAAABVjb25mX3doaXRlbGlzdGVkX29ubHkAAAAAC2RhcHBSdW5uaW5nBAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAADmRhcHBSdW5uaW5nS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFhBQAAAAckb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AANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAAAK0lIZw==", "height": 1319748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HRpFahxX4MSp2phhyKRQiBdHhVtNyifR1cXzgEYBfr6z Next: 6zPCs5w7cakVvN2fdCGfUoGSeuAmZ9bjVCuvjrHxkWK1 Diff:
OldNewDifferences
210210 else false)
211211 then ""
212212 else throw("Unknown status")
213- let userIsRegistered = getIntegerByKey(keyUserDate(address))
214- if (if ((userIsRegistered == 0))
215- then (status != userAllowed)
213+ if (if ((currentStatus == userAllowed))
214+ then (status == userAllowed)
216215 else false)
217- then throw("You cant set this status, user is not registered.")
218- else if (if ((currentStatus == userAllowed))
216+ then throw("User already allowed")
217+ else if (if ((currentStatus == userRegistered))
219218 then (status == userAllowed)
220219 else false)
221- then throw("User already allowed")
222- else if (if ((currentStatus == userRegistered))
220+ then throw("User already allowed & registered")
221+ else if (if ((currentStatus == userVerified))
223222 then (status == userAllowed)
224223 else false)
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 = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_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- }
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 = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_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+ }
239234 }
240235
241236
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 = (((((("{\"user_name\": \"" + toBase64String(toBytes(name))) + "\", \"user_thumb\":\"") + toBase64String(toBytes(thumb))) + "\",\"user_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- let userIsRegistered = getIntegerByKey(keyUserDate(address))
214- if (if ((userIsRegistered == 0))
215- then (status != userAllowed)
213+ if (if ((currentStatus == userAllowed))
214+ then (status == userAllowed)
216215 else false)
217- then throw("You cant set this status, user is not registered.")
218- else if (if ((currentStatus == userAllowed))
216+ then throw("User already allowed")
217+ else if (if ((currentStatus == userRegistered))
219218 then (status == userAllowed)
220219 else false)
221- then throw("User already allowed")
222- else if (if ((currentStatus == userRegistered))
220+ then throw("User already allowed & registered")
221+ else if (if ((currentStatus == userVerified))
223222 then (status == userAllowed)
224223 else false)
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 = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_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- }
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 = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_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+ }
239234 }
240235
241236
242237
243238 @Callable(i)
244239 func deleteUser (address) = {
245240 let caller = toString(addressFromPublicKey(i.callerPublicKey))
246241 let id = toBase58String(i.transactionId)
247242 let currentStatus = getStringByKey(keyUserStatus(address))
248243 if (containsElement([chris, toString(this)], caller))
249244 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)]
250245 else throw("Not allowed")
251246 }
252247
253248

github/deemru/w8io/026f985 
39.07 ms