tx · H3mntz1YWSBy7J4euLqsMX2zSCExLJDFAKuBzMgWtcXx

3N9cQgZFPHHVu8wqsn2DkQFehg3h8CNiooA:  -0.01000000 Waves

2021.09.20 12:28 [1711187] smart account 3N9cQgZFPHHVu8wqsn2DkQFehg3h8CNiooA > SELF 0.00000000 Waves

{ "type": 13, "id": "H3mntz1YWSBy7J4euLqsMX2zSCExLJDFAKuBzMgWtcXx", "fee": 1000000, "feeAssetId": null, "timestamp": 1632130203489, "version": 2, "chainId": 84, "sender": "3N9cQgZFPHHVu8wqsn2DkQFehg3h8CNiooA", "senderPublicKey": "BrgebGCQkzwYxFPR4YRmR4NsfwawwsS2ewpVr9LWVkQr", "proofs": [ "2bnspoPBehZkjgojajS6sa1FPKihtv5JoaTuQqcDy1qdYLGhWrZUieP1n7xNEei49dmC8xDk92zYE1j7vydCPYjF" ], "script": "base64:AAIFAAAAAAAAACkIAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIFCgMICAgSAwoBCAAAAB4AAAAABm93bmVyMQIAAAAjM012U0trcW1Mak5hSkFZcnRlSkIzSG5tdThyOGcxc2pwWUYAAAAABm93bmVyMgIAAAAjM04xRGhxNVpaeW9valFpc3VUTHVzWWpuR2lzcXJ4RHdHTHkAAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAABJ3aGl0ZWxpc3RlZG9ubHlLZXkCAAAAFWNvbmZfd2hpdGVsaXN0ZWRfb25seQAAAAALZGFwcFJ1bm5pbmcJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAEdGhpcwUAAAAOZGFwcFJ1bm5pbmdLZXkGAAAAAA5tYWludGVuYW5jZU1TRwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAABFtYWludGVuYW5jZU1TR0tleQIAA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UtleQAAAAEJAQAAAA1rZXlVc2VyU3RhdHVzAAAAAQUAAAAHYWRkcmVzcwMJAQAAAA9jb250YWluc0VsZW1lbnQAAAACCQAETAAAAAIFAAAABm93bmVyMQkABEwAAAACBQAAAAZvd25lcjIJAARMAAAAAgkABCUAAAABBQAAAAR0aGlzBQAAAANuaWwFAAAABmNhbGxlcgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAALa2V5VXNlckRhdGUAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAtrZXlVc2VyQWRkcgAAAAEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAC2tleVVzZXJOYW1lAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAALa2V5VXNlckRlc2MAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAA1rZXlVc2VyU29jaWFsAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMa2V5VXNlclRodW1iAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAEsAAAAAgUAAAANY3VycmVudFN0YXR1cwIAAAABXwUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAANa2V5VXNlclN0YXR1cwAAAAEFAAAAB2FkZHJlc3MFAAAAC3VzZXJSZW1vdmVkBQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAAAs/YTPw==", "height": 1711187, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EcUq2GwJjsjRHFo9pmazEDnuH2qQv9t2rRp5SZkG28fd Next: F4g7jfxGDt8zBN7nqwDcHyN98YXrr8xqpn8XvawiBq2S Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let owner1 = "3MvSKkqmLjNaJAYrteJB3Hnmu8r8g1sjpYF"
55
66 let owner2 = "3N1Dhq5ZZyoojQisuTLusYjnGisqrxDwGLy"
77
88 let dappRunningKey = "conf_dapp_is_running"
99
1010 let maintenanceMSGKey = "conf_maintenance_msg"
1111
1212 let whitelistedonlyKey = "conf_whitelisted_only"
1313
1414 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
1515
1616 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
1717
1818 let whitelistedonly = valueOrElse(getBoolean(this, whitelistedonlyKey), true)
1919
2020 let userAllowed = "ALLOWED"
2121
2222 let userRegistered = "REGISTERED"
2323
2424 let userVerified = "VERIFIED"
2525
2626 let userSuspended = "SUSPENDED"
2727
2828 let userRemoved = "REMOVED"
2929
3030 let userChangeRequired = "CHANGE_REQUIRED"
3131
3232 let userUnregistered = "UNREGISTERED"
3333
3434 let userReset = "RESET"
3535
3636 func getStringByKey (key) = valueOrElse(getString(this, key), "")
3737
3838
3939 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
4040
4141
4242 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
4343
4444
4545 func keyUserAddr (caller) = ("user_" + caller)
4646
4747
4848 func keyUserName (caller) = ("user_name_" + caller)
4949
5050
5151 func keyUserDesc (caller) = ("user_desc_" + caller)
5252
5353
5454 func keyUserSocial (caller) = ("user_social_" + caller)
5555
5656
5757 func keyUserThumb (caller) = ("user_thumb_" + caller)
5858
5959
6060 func keyUserStatus (caller) = ("user_status_" + caller)
6161
6262
6363 func keyUserDate (caller) = ("user_date_" + caller)
6464
6565
6666 func validateCID (cid) = if (contains(cid, "/"))
6767 then if (if ((63 > size(cid)))
6868 then (size(split(cid, "/")[0]) == 46)
6969 else false)
7070 then (16 > size(split(cid, "/")[1]))
7171 else false
7272 else false
7373
7474
7575 func validUserData (caller,name,description,thumb,isAnUpdate) = {
7676 let validCID = if ((size(thumb) != 0))
7777 then validateCID(thumb)
7878 else true
7979 if (!(validCID))
8080 then throw("CID don't match requirement!")
8181 else if (if ((name == ""))
8282 then true
8383 else (description == ""))
8484 then throw("Name and description cannot be empty")
8585 else if ((size(description) > 600))
8686 then throw("600 Char. max description")
8787 else if ((size(name) > 45))
8888 then throw("45 Char. max name")
8989 else {
9090 let status = getStringByKey(keyUserStatus(caller))
9191 if (if ((status == userSuspended))
9292 then true
9393 else (status == userRemoved))
9494 then throw("Account suspended/ removed.")
9595 else if (if (!(isAnUpdate))
9696 then (status == userRegistered)
9797 else false)
9898 then throw("Already registered")
9999 else if (if (if (!(isAnUpdate))
100100 then (status == "")
101101 else false)
102102 then whitelistedonly
103103 else false)
104104 then throw("Can't register, get approved first.")
105105 else if (if (if (isAnUpdate)
106106 then (status == "")
107107 else false)
108108 then true
109109 else if (isAnUpdate)
110110 then (status == userAllowed)
111111 else false)
112112 then throw("Register first")
113113 else true
114114 }
115115 }
116116
117117
118118 func validateNewStatus (status,address,currentStatus) = {
119119 let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired]
120120 let statusToSet = if (containsElement(allStatus, status))
121121 then status
122122 else if (if ((status == userReset))
123123 then (currentStatus == userAllowed)
124124 else false)
125125 then ""
126126 else throw("Unknown status")
127127 let userIsRegistered = getIntegerByKey(keyUserDate(address))
128128 if (if ((userIsRegistered == 0))
129129 then (statusToSet != userAllowed)
130130 else false)
131131 then throw("You cant set this status, user is not registered.")
132132 else if (if ((currentStatus == userAllowed))
133133 then (statusToSet == userAllowed)
134134 else false)
135135 then throw("User already allowed")
136136 else if (if ((currentStatus == userRegistered))
137137 then (statusToSet == userAllowed)
138138 else false)
139139 then throw("User already allowed & registered")
140140 else if (if ((currentStatus == userVerified))
141141 then (statusToSet == userAllowed)
142142 else false)
143143 then throw("User already allowed & verified")
144144 else statusToSet
145145 }
146146
147147
148148 func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}")
149149
150150
151151 @Callable(invoke)
152152 func appRunning (isLive,message) = {
153153 let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
154154 let id = toBase58String(invoke.transactionId)
155155 if (containsElement([owner1, owner2, toString(this)], caller))
156156 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
157157 else throw("You are not allowed to change this")
158158 }
159159
160160
161161
162162 @Callable(invoke)
163163 func registrationMode (WLonly) = {
164164 let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
165165 let id = toBase58String(invoke.transactionId)
166166 if (containsElement([owner1, owner2, toString(this)], caller))
167167 then [BooleanEntry(whitelistedonlyKey, WLonly)]
168168 else throw("You are not allowed to change this")
169169 }
170170
171171
172172
173173 @Callable(invoke)
174174 func registerUser (name,description,thumb,social) = if (!(dappRunning))
175175 then throw(maintenanceMSG)
176176 else {
177177 let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
178178 let id = toBase58String(invoke.transactionId)
179179 let timestamp = lastBlock.timestamp
180180 if (!(validUserData(caller, name, description, thumb, false)))
181181 then throw("Something went wrong")
182182 else {
183183 let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp))
184184 [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)]
185185 }
186186 }
187187
188188
189189
190190 @Callable(invoke)
191191 func updateUser (name,description,thumb,social) = if (!(dappRunning))
192192 then throw(maintenanceMSG)
193193 else {
194194 let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
195195 let id = toBase58String(invoke.transactionId)
196196 let status = getStringByKey(keyUserStatus(caller))
197197 if (!(validUserData(caller, name, description, thumb, true)))
198198 then throw("Something went wrong")
199199 else {
200200 let date = getIntegerByKey(keyUserDate(caller))
201201 let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date))
202202 [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), StringEntry(((status + "_") + caller), json)]
203203 }
204204 }
205205
206206
207207
208208 @Callable(invoke)
209209 func changeUserStatus (address,status,note) = {
210210 let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
211211 let id = toBase58String(invoke.transactionId)
212212 let addr = addressFromString(address)
213213 match addr {
214214 case addr: Address =>
215215 let currentStatus = getStringByKey(keyUserStatus(address))
216216 let statusToSet = validateNewStatus(status, address, currentStatus)
217217 let name = toBase64String(toBytes(getStringByKey(keyUserName(address))))
218218 let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address))))
219219 let date = getIntegerByKey(keyUserDate(address))
220220 let json = makeJSON(name, thumb, toString(date))
221221 if (containsElement([owner1, owner2, toString(this)], caller))
222222 then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)]
223223 else throw("Not allowed to change user status")
224224 case _ =>
225225 throw("Seems to be an invalid address!")
226226 }
227227 }
228228
229229
230230
231231 @Callable(invoke)
232232 func deleteUser (address) = {
233233 let caller = toString(addressFromPublicKey(invoke.callerPublicKey))
234234 let id = toBase58String(invoke.transactionId)
235235 let currentStatus = getStringByKey(keyUserStatus(address))
236236 if (containsElement([owner1, owner2, toString(this)], caller))
237237 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)]
238238 else throw("Not allowed")
239239 }
240240
241241

github/deemru/w8io/873ac7e 
40.12 ms