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