tx · 31WFJ9N3oGv8fMZTsAfcPbckScgviAGvvmVMZ6owcAGo 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.01400000 Waves 2020.12.22 11:52 [1319695] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "31WFJ9N3oGv8fMZTsAfcPbckScgviAGvvmVMZ6owcAGo", "fee": 1400000, "feeAssetId": null, "timestamp": 1608627136618, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "59qXFb2WHk7n6RZHYKE84ekUZq85RAGtcmdYNELV1Z3VwtAK4KoyCwhsTHFEk4ShXEBZs13TVW9pcpTNGa2enVLM" ], "script": "base64:AAIEAAAAAAAAACgIAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIECgIICBIDCgEIAAAAHAAAAAALc2lnbkFzc2V0SWQBAAAAIOilarzKd0LycGEyNUpPRYO5uR7lmWcXw3Hq2QuhBK3rAAAAAAVjaHJpcwIAAAAjM01zRzZqUE5DclZKVXRZQjdYSkJ4Uzd1dFdzWEFmNG45VnAAAAAABGpvZXACAAAAIzNNem00Vkx3c045dVp3YlRNelBqM1h1eFY2a0VmQVI4VUROAAAAAA5kYXBwUnVubmluZ0tleQIAAAAUY29uZl9kYXBwX2lzX3J1bm5pbmcAAAAAEW1haW50ZW5hbmNlTVNHS2V5AgAAABRjb25mX21haW50ZW5hbmNlX21zZwAAAAASd2hpdGVsaXN0ZWRvbmx5S2V5AgAAABVjb25mX3doaXRlbGlzdGVkX29ubHkAAAAAC2RhcHBSdW5uaW5nBAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAADmRhcHBSdW5uaW5nS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFhBQAAAA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AAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMa2V5VXNlclRodW1iAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAEsAAAAAgUAAAANY3VycmVudFN0YXR1cwIAAAABXwUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAANa2V5VXNlclN0YXR1cwAAAAEFAAAAB2FkZHJlc3MFAAAAC3VzZXJSZW1vdmVkBQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAAAeFOHYw==", "height": 1319695, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BgHLYGcxna3mZAShseWAkNGTmeAqNgzs6JLfC81wEZEQ Next: GQGhbPUpBdYBzXAjVXwgCsjoJ6MoMoA5pCkRGXDDCP6r Diff:
Old | New | Differences | |
---|---|---|---|
151 | 151 | else if ((size(name) > 45)) | |
152 | 152 | then throw("45 Char. max name") | |
153 | 153 | else { | |
154 | - | let json = (((((((("{\"address\": \"" + caller) + "\", \"name\": \"") + toBase64String(toBytes( | |
154 | + | let json = (((((((("{\"address\": \"" + caller) + "\", \"name\": \"") + toBase64String(toBytes(name))) + "\", \"thumb\":\"") + toBase64String(toBytes(thumb))) + "\",\"date\":\"") + toString(timestamp)) + "\"}") | |
155 | 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)] | |
156 | 156 | } | |
157 | 157 | } |
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 | - | let json = (((((((("{\"address\": \"" + caller) + "\", \"name\": \"") + toBase64String(toBytes( | |
154 | + | let json = (((((((("{\"address\": \"" + caller) + "\", \"name\": \"") + toBase64String(toBytes(name))) + "\", \"thumb\":\"") + toBase64String(toBytes(thumb))) + "\",\"date\":\"") + toString(timestamp)) + "\"}") | |
155 | 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)] | |
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 |
github/deemru/w8io/169f3d6 35.18 ms ◑