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