tx · FvhHmXq491ttKsuqtTqLipg6SLoGurc2mvaNb1CEPFYa 3NC8ChjvXtCyU1cR1MSmLRnngfmq6YPTa4H: -0.01000000 Waves 2022.02.13 19:25 [1922086] smart account 3NC8ChjvXtCyU1cR1MSmLRnngfmq6YPTa4H > SELF 0.00000000 Waves
{ "type": 13, "id": "FvhHmXq491ttKsuqtTqLipg6SLoGurc2mvaNb1CEPFYa", "fee": 1000000, "feeAssetId": null, "timestamp": 1644769525387, "version": 2, "chainId": 84, "sender": "3NC8ChjvXtCyU1cR1MSmLRnngfmq6YPTa4H", "senderPublicKey": "3yE8TJyqVS51YBmLAzg6XTz2LcFWGUFty4nxV6o27tEb", "proofs": [ "4oae7h385b6GYWFvHkikEmsjto6bPFRXmaCfQ5uPTSaBiKP4RnpB3YbjSLymaumMq6f5ygQ3nh6DAw8QsMqeL2ci" ], "script": "base64:AAIFAAAAAAAAADEIAhIECgIECBIDCgEEEgcKBQgICAgIEgcKBQgICAgIEgYKBAgICAgSAwoBCBIDCgEIAAAAHwAAAAAJb3JhY2xlRmVlCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNNcFpRanpHb2dtaWZjRUtlOG1EZDZyaWJMN254VDlBQ3llAAAAAAZvd25lcnMJAARMAAAAAgkABB0AAAACBQAAAAlvcmFjbGVGZWUCAAAABm93bmVyMQkABEwAAAACCQAEHQAAAAIFAAAACW9yYWNsZUZlZQIAAAAGb3duZXIyBQAAAANuaWwAAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAABJ3aGl0ZWxpc3RlZG9ubHlLZXkCAAAAFWNvbmZfd2hpdGVsaXN0ZWRfb25seQAAAAALZGFwcFJ1bm5pbmcJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAEdGhpcwUAAAAOZGFwcFJ1bm5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AEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAQAAAA9jb250YWluc0VsZW1lbnQAAAACBQAAAAZvd25lcnMFAAAABmNhbGxlcgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAVlbnRyeQUAAAADbmlsCQAAAgAAAAECAAAAAm5vAAAAAAKge9Q=", "height": 1922086, "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 userRegistered = "REGISTERED" | |
21 | + | ||
22 | + | let userVerified = "VERIFIED" | |
23 | + | ||
24 | + | let userSuspended = "SUSPENDED" | |
25 | + | ||
26 | + | let userRemoved = "REMOVED" | |
27 | + | ||
28 | + | let userChangeRequired = "CHANGE_REQUIRED" | |
29 | + | ||
30 | + | let userUnregistered = "UNREGISTERED" | |
31 | + | ||
32 | + | let userReset = "RESET" | |
33 | + | ||
34 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
35 | + | ||
36 | + | ||
37 | + | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
38 | + | ||
39 | + | ||
40 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
41 | + | ||
42 | + | ||
43 | + | func keyUserAddr (caller) = ("user_" + caller) | |
44 | + | ||
45 | + | ||
46 | + | func keyUserName (caller) = ("user_name_" + caller) | |
47 | + | ||
48 | + | ||
49 | + | func keyUserDesc (caller) = ("user_desc_" + caller) | |
50 | + | ||
51 | + | ||
52 | + | func keyUserSocial (caller) = ("user_social_" + caller) | |
53 | + | ||
54 | + | ||
55 | + | func keyUserThumb (caller) = ("user_thumb_" + caller) | |
56 | + | ||
57 | + | ||
58 | + | func keyUserBanner (caller) = ("user_banner_" + caller) | |
59 | + | ||
60 | + | ||
61 | + | func keyUserStatus (caller) = ("user_status_" + caller) | |
62 | + | ||
63 | + | ||
64 | + | func keyUserDate (caller) = ("user_date_" + caller) | |
65 | + | ||
66 | + | ||
67 | + | func validateCID (cid) = if (contains(cid, "/")) | |
68 | + | then if (if ((63 > size(cid))) | |
69 | + | then (size(split(cid, "/")[0]) == 46) | |
70 | + | else false) | |
71 | + | then (16 > size(split(cid, "/")[1])) | |
72 | + | else false | |
73 | + | else false | |
74 | + | ||
75 | + | ||
76 | + | func validateBanner (cid) = if ((size(cid) == 0)) | |
77 | + | then true | |
78 | + | else if ((size(cid) == 46)) | |
79 | + | then true | |
80 | + | else false | |
81 | + | ||
82 | + | ||
83 | + | func validUserData (caller,name,description,thumb,isAnUpdate) = { | |
84 | + | let validCID = if ((size(thumb) != 0)) | |
85 | + | then validateCID(thumb) | |
86 | + | else true | |
87 | + | if (!(validCID)) | |
88 | + | then throw("CID don't match requirement!") | |
89 | + | else if (if ((name == "")) | |
90 | + | then true | |
91 | + | else (description == "")) | |
92 | + | then throw("Name and description cannot be empty") | |
93 | + | else if ((size(description) > 600)) | |
94 | + | then throw("600 Char. max description") | |
95 | + | else if ((size(name) > 45)) | |
96 | + | then throw("45 Char. max name") | |
97 | + | else { | |
98 | + | let status = getStringByKey(keyUserStatus(caller)) | |
99 | + | if (if ((status == userSuspended)) | |
100 | + | then true | |
101 | + | else (status == userRemoved)) | |
102 | + | then throw("Account suspended/ removed.") | |
103 | + | else if (if (!(isAnUpdate)) | |
104 | + | then (status == userRegistered) | |
105 | + | else false) | |
106 | + | then throw("Already registered") | |
107 | + | else if (if (isAnUpdate) | |
108 | + | then (status == "") | |
109 | + | else false) | |
110 | + | then throw("Register first") | |
111 | + | else true | |
112 | + | } | |
113 | + | } | |
114 | + | ||
115 | + | ||
116 | + | func validateNewStatus (status,address,currentStatus) = { | |
117 | + | let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userChangeRequired] | |
118 | + | let statusToSet = if (containsElement(allStatus, status)) | |
119 | + | then status | |
120 | + | else if ((status == userReset)) | |
121 | + | then "" | |
122 | + | else throw("Unknown status") | |
123 | + | let userIsRegistered = getIntegerByKey(keyUserDate(address)) | |
124 | + | if ((userIsRegistered == 0)) | |
125 | + | then throw("You cant set this status, user is not registered.") | |
126 | + | else statusToSet | |
127 | + | } | |
128 | + | ||
129 | + | ||
130 | + | func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}") | |
131 | + | ||
132 | + | ||
133 | + | @Callable(invoke) | |
134 | + | func appRunning (isLive,message) = { | |
135 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
136 | + | let id = toBase58String(invoke.transactionId) | |
137 | + | if (containsElement((owners :+ toString(this)), caller)) | |
138 | + | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
139 | + | else throw("You are not allowed to change this") | |
140 | + | } | |
141 | + | ||
142 | + | ||
143 | + | ||
144 | + | @Callable(invoke) | |
145 | + | func registrationMode (WLonly) = { | |
146 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
147 | + | let id = toBase58String(invoke.transactionId) | |
148 | + | if (containsElement((owners :+ toString(this)), caller)) | |
149 | + | then [BooleanEntry(whitelistedonlyKey, WLonly)] | |
150 | + | else throw("You are not allowed to change this") | |
151 | + | } | |
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | @Callable(invoke) | |
156 | + | func registerUser (name,description,thumb,social,banner) = if (!(dappRunning)) | |
157 | + | then throw(maintenanceMSG) | |
158 | + | else { | |
159 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
160 | + | let id = toBase58String(invoke.transactionId) | |
161 | + | let timestamp = lastBlock.timestamp | |
162 | + | if (!(validateBanner(banner))) | |
163 | + | then throw("Invalid banner image!") | |
164 | + | else if (!(validUserData(caller, name, description, thumb, false))) | |
165 | + | then throw("Something went wrong") | |
166 | + | else { | |
167 | + | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp)) | |
168 | + | [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), StringEntry(((userRegistered + "_") + caller), json)] | |
169 | + | } | |
170 | + | } | |
171 | + | ||
172 | + | ||
173 | + | ||
174 | + | @Callable(invoke) | |
175 | + | func updateUser (name,description,thumb,social,banner) = if (!(dappRunning)) | |
176 | + | then throw(maintenanceMSG) | |
177 | + | else { | |
178 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
179 | + | let id = toBase58String(invoke.transactionId) | |
180 | + | let status = getStringByKey(keyUserStatus(caller)) | |
181 | + | if (!(validateBanner(banner))) | |
182 | + | then throw("Invalid banner image!") | |
183 | + | else if (!(validUserData(caller, name, description, thumb, true))) | |
184 | + | then throw("Something went wrong") | |
185 | + | else { | |
186 | + | let date = getIntegerByKey(keyUserDate(caller)) | |
187 | + | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date)) | |
188 | + | [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserBanner(caller), banner), StringEntry(keyUserThumb(caller), thumb), StringEntry(((status + "_") + caller), json)] | |
189 | + | } | |
190 | + | } | |
191 | + | ||
192 | + | ||
193 | + | ||
194 | + | @Callable(invoke) | |
195 | + | func changeUserStatus (address,status,note,category) = { | |
196 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
197 | + | let id = toBase58String(invoke.transactionId) | |
198 | + | let addr = addressFromString(address) | |
199 | + | match addr { | |
200 | + | case addr: Address => | |
201 | + | let currentStatus = getStringByKey(keyUserStatus(address)) | |
202 | + | let statusToSet = validateNewStatus(status, address, currentStatus) | |
203 | + | let name = toBase64String(toBytes(getStringByKey(keyUserName(address)))) | |
204 | + | let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address)))) | |
205 | + | let date = getIntegerByKey(keyUserDate(address)) | |
206 | + | let json = makeJSON(name, thumb, toString(date)) | |
207 | + | if (containsElement((owners :+ toString(this)), caller)) | |
208 | + | then { | |
209 | + | let categoryData = if ((statusToSet == userVerified)) | |
210 | + | then [StringEntry(("category_" + address), category)] | |
211 | + | else [DeleteEntry(("category_" + address))] | |
212 | + | (categoryData ++ [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)]) | |
213 | + | } | |
214 | + | else throw("Not allowed to change user status") | |
215 | + | case _ => | |
216 | + | throw("Seems to be an invalid address!") | |
217 | + | } | |
218 | + | } | |
219 | + | ||
220 | + | ||
221 | + | ||
222 | + | @Callable(invoke) | |
223 | + | func deleteUser (address) = { | |
224 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
225 | + | let id = toBase58String(invoke.transactionId) | |
226 | + | let currentStatus = getStringByKey(keyUserStatus(address)) | |
227 | + | if (containsElement((owners :+ toString(this)), caller)) | |
228 | + | then [DeleteEntry(keyUserDate(address)), DeleteEntry(keyUserAddr(address)), DeleteEntry(keyUserName(address)), DeleteEntry(keyUserDesc(address)), DeleteEntry(keyUserSocial(address)), DeleteEntry(keyUserThumb(address)), DeleteEntry(((currentStatus + "_") + address)), DeleteEntry(("category_" + address)), StringEntry(keyUserStatus(address), userRemoved)] | |
229 | + | else throw("Not allowed") | |
230 | + | } | |
231 | + | ||
232 | + | ||
233 | + | ||
234 | + | @Callable(i) | |
235 | + | func deleteEntry (entry) = { | |
236 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
237 | + | if (containsElement(owners, caller)) | |
238 | + | then [DeleteEntry(entry)] | |
239 | + | else throw("no") | |
240 | + | } | |
241 | + | ||
242 | + |
github/deemru/w8io/026f985 24.92 ms ◑