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