tx · GQGhbPUpBdYBzXAjVXwgCsjoJ6MoMoA5pCkRGXDDCP6r 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.01400000 Waves 2020.12.22 12:08 [1319710] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "GQGhbPUpBdYBzXAjVXwgCsjoJ6MoMoA5pCkRGXDDCP6r", "fee": 1400000, "feeAssetId": null, "timestamp": 1608628104001, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "2BEqpVY6W6j8t3LL4Jfmu49fQcjiDQNw8zZQ3DaQPwNUqDKtFit8vDXiHhRbQej3tds9eSx24Vw6pcwDvVpwur4R" ], "script": "base64:AAIEAAAAAAAAAC0IAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIECgIICBIDCgEIEgMKAQgAAAAcAAAAAAtzaWduQXNzZXRJZAEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresAAAAABWNocmlzAgAAACMzTXNHNmpQTkNyVkpVdFlCN1hKQnhTN3V0V3NYQWY0bjlWcAAAAAAEam9lcAIAAAAjM016bTRWTHdzTjl1WndiVE16UGozWHV4VjZrRWZBUjhVRE4AAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAABJ3aGl0ZWxpc3RlZG9ubHlLZXkCAAAAFWNvbmZfd2hpdGVsaXN0ZWRfb25seQAAAAALZGFwcFJ1bm5pbmcEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAAOZGFwcFJ1bm5pbmdLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAA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nkAAAABCQEAAAALa2V5VXNlckRlc2MAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAA1rZXlVc2VyU29jaWFsAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMa2V5VXNlclRodW1iAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAEsAAAAAgUAAAANY3VycmVudFN0YXR1cwIAAAABXwUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAANa2V5VXNlclN0YXR1cwAAAAEFAAAAB2FkZHJlc3MFAAAAC3VzZXJSZW1vdmVkBQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAABaQEAAAALZGVsZXRlRW50cnkAAAABAAAABWVudHJ5BAAAAAZjYWxsZXIJAAQlAAAAAQkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkAAAAAAAACBQAAAAZjYWxsZXIFAAAABWNocmlzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAABWVudHJ5BQAAAANuaWwJAAACAAAAAQIAAAACbm8AAAAAcsOHYw==", "height": 1319710, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 31WFJ9N3oGv8fMZTsAfcPbckScgviAGvvmVMZ6owcAGo Next: 7LDLRphrwKGHuR855Q8mv5jLF2jKWEZ18ysDfEqu86LG Diff:
Old | New | Differences | |
---|---|---|---|
152 | 152 | then throw("45 Char. max name") | |
153 | 153 | else { | |
154 | 154 | let json = (((((((("{\"address\": \"" + caller) + "\", \"name\": \"") + toBase64String(toBytes(name))) + "\", \"thumb\":\"") + toBase64String(toBytes(thumb))) + "\",\"date\":\"") + toString(timestamp)) + "\"}") | |
155 | - | [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), StringEntry(((userRegistered + "_") + caller), json)] | |
155 | + | [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)] | |
156 | 156 | } | |
157 | 157 | } | |
158 | 158 | ||
251 | 251 | } | |
252 | 252 | ||
253 | 253 | ||
254 | + | ||
255 | + | @Callable(i) | |
256 | + | func deleteEntry (entry) = { | |
257 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
258 | + | if ((caller == chris)) | |
259 | + | then [DeleteEntry(entry)] | |
260 | + | else throw("no") | |
261 | + | } | |
262 | + | ||
263 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
5 | 5 | ||
6 | 6 | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
7 | 7 | ||
8 | 8 | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
9 | 9 | ||
10 | 10 | let dappRunningKey = "conf_dapp_is_running" | |
11 | 11 | ||
12 | 12 | let maintenanceMSGKey = "conf_maintenance_msg" | |
13 | 13 | ||
14 | 14 | let whitelistedonlyKey = "conf_whitelisted_only" | |
15 | 15 | ||
16 | 16 | let dappRunning = match getBoolean(this, dappRunningKey) { | |
17 | 17 | case a: Boolean => | |
18 | 18 | a | |
19 | 19 | case _ => | |
20 | 20 | true | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | let maintenanceMSG = match getString(this, maintenanceMSGKey) { | |
24 | 24 | case a: String => | |
25 | 25 | a | |
26 | 26 | case _ => | |
27 | 27 | "" | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | let whitelistedonly = match getBoolean(this, whitelistedonlyKey) { | |
31 | 31 | case a: Boolean => | |
32 | 32 | a | |
33 | 33 | case _ => | |
34 | 34 | true | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | let userAllowed = "ALLOWED" | |
38 | 38 | ||
39 | 39 | let userRegistered = "REGISTERED" | |
40 | 40 | ||
41 | 41 | let userVerified = "VERIFIED" | |
42 | 42 | ||
43 | 43 | let userSuspended = "SUSPENDED" | |
44 | 44 | ||
45 | 45 | let userRemoved = "REMOVED" | |
46 | 46 | ||
47 | 47 | let userChangeRequired = "CHANGE_REQUIRED" | |
48 | 48 | ||
49 | 49 | let userUnregistered = "UNREGISTERED" | |
50 | 50 | ||
51 | 51 | let userReset = "RESET" | |
52 | 52 | ||
53 | 53 | func getStringByKey (key) = match getString(this, key) { | |
54 | 54 | case a: String => | |
55 | 55 | a | |
56 | 56 | case _ => | |
57 | 57 | "" | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getBooleanByKey (key) = match getBoolean(this, key) { | |
62 | 62 | case a: Boolean => | |
63 | 63 | a | |
64 | 64 | case _ => | |
65 | 65 | false | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getIntegerByKey (key) = match getInteger(this, key) { | |
70 | 70 | case i: Int => | |
71 | 71 | i | |
72 | 72 | case _ => | |
73 | 73 | 0 | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func validateCID (cid) = if (if ((75 > size(cid))) | |
78 | 78 | then (60 > size(split(cid, "/")[0])) | |
79 | 79 | else false) | |
80 | 80 | then (16 > size(split(cid, "/")[1])) | |
81 | 81 | else false | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyUserAddr (caller) = ("user_" + caller) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyUserName (caller) = ("user_name_" + caller) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyUserDesc (caller) = ("user_desc_" + caller) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyUserSocial (caller) = ("user_social_" + caller) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyUserThumb (caller) = ("user_thumb_" + caller) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyUserStatus (caller) = ("user_status_" + caller) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyUserDate (caller) = ("user_date_" + caller) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(i) | |
106 | 106 | func appRunning (isLive,message) = { | |
107 | 107 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
108 | 108 | let id = toBase58String(i.transactionId) | |
109 | 109 | if (containsElement([chris, joep, toString(this)], caller)) | |
110 | 110 | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
111 | 111 | else throw("You are not allowed to change this") | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | ||
116 | 116 | @Callable(i) | |
117 | 117 | func registrationMode (WLonly) = { | |
118 | 118 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
119 | 119 | let id = toBase58String(i.transactionId) | |
120 | 120 | if (containsElement([chris, joep, toString(this)], caller)) | |
121 | 121 | then [BooleanEntry(whitelistedonlyKey, WLonly)] | |
122 | 122 | else throw("You are not allowed to change this") | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | ||
127 | 127 | @Callable(i) | |
128 | 128 | func registerUser (name,description,thumb,social) = if (!(dappRunning)) | |
129 | 129 | then throw(maintenanceMSG) | |
130 | 130 | else { | |
131 | 131 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
132 | 132 | let canRegister = getStringByKey(keyUserStatus(caller)) | |
133 | 133 | let id = toBase58String(i.transactionId) | |
134 | 134 | let timestamp = lastBlock.timestamp | |
135 | 135 | if (if ((canRegister == userSuspended)) | |
136 | 136 | then true | |
137 | 137 | else (canRegister == userRemoved)) | |
138 | 138 | then throw("Account suspended/ removed.") | |
139 | 139 | else if ((canRegister == userRegistered)) | |
140 | 140 | then throw("Already registered") | |
141 | 141 | else if (if ((canRegister == "")) | |
142 | 142 | then whitelistedonly | |
143 | 143 | else false) | |
144 | 144 | then throw("Can't register, get approved first.") | |
145 | 145 | else if (if ((name == "")) | |
146 | 146 | then true | |
147 | 147 | else (description == "")) | |
148 | 148 | then throw("Name and description cannot be empty") | |
149 | 149 | else if ((size(description) > 600)) | |
150 | 150 | then throw("600 Char. max description") | |
151 | 151 | else if ((size(name) > 45)) | |
152 | 152 | then throw("45 Char. max name") | |
153 | 153 | else { | |
154 | 154 | let json = (((((((("{\"address\": \"" + caller) + "\", \"name\": \"") + toBase64String(toBytes(name))) + "\", \"thumb\":\"") + toBase64String(toBytes(thumb))) + "\",\"date\":\"") + toString(timestamp)) + "\"}") | |
155 | - | [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), StringEntry(((userRegistered + "_") + caller), json)] | |
155 | + | [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)] | |
156 | 156 | } | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | ||
161 | 161 | @Callable(i) | |
162 | 162 | func updateUser (name,description,thumb,social) = if (!(dappRunning)) | |
163 | 163 | then throw(maintenanceMSG) | |
164 | 164 | else { | |
165 | 165 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
166 | 166 | let id = toBase58String(i.transactionId) | |
167 | 167 | let canUpdate = getStringByKey(keyUserStatus(caller)) | |
168 | 168 | if (if ((canUpdate == userSuspended)) | |
169 | 169 | then true | |
170 | 170 | else (canUpdate == userRemoved)) | |
171 | 171 | then throw("Account suspended/ removed.") | |
172 | 172 | else if (if ((canUpdate == "")) | |
173 | 173 | then true | |
174 | 174 | else (canUpdate == userAllowed)) | |
175 | 175 | then throw("Register first") | |
176 | 176 | else if (if ((name == "")) | |
177 | 177 | then true | |
178 | 178 | else (description == "")) | |
179 | 179 | then throw("Name & description cannot be empty") | |
180 | 180 | else if ((size(description) > 600)) | |
181 | 181 | then throw("600 Char. max for description") | |
182 | 182 | else if ((size(name) > 45)) | |
183 | 183 | then throw("45 Char. max name") | |
184 | 184 | else [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb)] | |
185 | 185 | } | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | ||
189 | 189 | @Callable(i) | |
190 | 190 | func changeUserStatus (address,status) = if (!(dappRunning)) | |
191 | 191 | then throw(maintenanceMSG) | |
192 | 192 | else { | |
193 | 193 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
194 | 194 | let id = toBase58String(i.transactionId) | |
195 | 195 | let currentStatus = getStringByKey(keyUserStatus(address)) | |
196 | 196 | let statusToSet = if ((status == userVerified)) | |
197 | 197 | then userVerified | |
198 | 198 | else if ((status == userRegistered)) | |
199 | 199 | then userRegistered | |
200 | 200 | else if ((status == userSuspended)) | |
201 | 201 | then userSuspended | |
202 | 202 | else if ((status == userRemoved)) | |
203 | 203 | then userRemoved | |
204 | 204 | else if ((status == userAllowed)) | |
205 | 205 | then userAllowed | |
206 | 206 | else if ((status == userChangeRequired)) | |
207 | 207 | then userChangeRequired | |
208 | 208 | else if (if ((status == userReset)) | |
209 | 209 | then (currentStatus == userAllowed) | |
210 | 210 | else false) | |
211 | 211 | then "" | |
212 | 212 | else throw("Unknown status") | |
213 | 213 | let userIsRegistered = getIntegerByKey(keyUserDate(address)) | |
214 | 214 | if (if ((userIsRegistered == 0)) | |
215 | 215 | then (status != userAllowed) | |
216 | 216 | else false) | |
217 | 217 | then throw("You cant set this status, user is not registered.") | |
218 | 218 | else if (if ((currentStatus == userAllowed)) | |
219 | 219 | then (status == userAllowed) | |
220 | 220 | else false) | |
221 | 221 | then throw("User already allowed") | |
222 | 222 | else if (if ((currentStatus == userRegistered)) | |
223 | 223 | then (status == userAllowed) | |
224 | 224 | else false) | |
225 | 225 | then throw("User already allowed & registered") | |
226 | 226 | else if (if ((currentStatus == userVerified)) | |
227 | 227 | then (status == userAllowed) | |
228 | 228 | else false) | |
229 | 229 | then throw("User already allowed & verified") | |
230 | 230 | else { | |
231 | 231 | let name = toBase64String(toBytes(getStringByKey(keyUserName(address)))) | |
232 | 232 | let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address)))) | |
233 | 233 | let date = getIntegerByKey(keyUserDate(address)) | |
234 | 234 | let json = (((((((("{\"address\": \"" + address) + "\", \"name\": \"") + name) + "\", \"thumb\":\"") + thumb) + "\",\"date\":\"") + toString(date)) + "\"}") | |
235 | 235 | if (containsElement([chris, joep, toString(this)], caller)) | |
236 | 236 | then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json)] | |
237 | 237 | else throw("Not allowed to change user status") | |
238 | 238 | } | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | ||
243 | 243 | @Callable(i) | |
244 | 244 | func deleteUser (address) = { | |
245 | 245 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
246 | 246 | let id = toBase58String(i.transactionId) | |
247 | 247 | let currentStatus = getStringByKey(keyUserStatus(address)) | |
248 | 248 | if (containsElement([chris, toString(this)], caller)) | |
249 | 249 | 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)] | |
250 | 250 | else throw("Not allowed") | |
251 | 251 | } | |
252 | 252 | ||
253 | 253 | ||
254 | + | ||
255 | + | @Callable(i) | |
256 | + | func deleteEntry (entry) = { | |
257 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
258 | + | if ((caller == chris)) | |
259 | + | then [DeleteEntry(entry)] | |
260 | + | else throw("no") | |
261 | + | } | |
262 | + | ||
263 | + |
github/deemru/w8io/169f3d6 43.97 ms ◑