tx · CEkpSyQVj2TBPc7zpAUDBeUsqrEbqXpACg9hKXAYzCy6 3N5SvV5gLbCNEM8hLKhajqK7G2S44CwAHeR: -0.01000000 Waves 2021.01.05 12:18 [1339897] smart account 3N5SvV5gLbCNEM8hLKhajqK7G2S44CwAHeR > SELF 0.00000000 Waves
{ "type": 13, "id": "CEkpSyQVj2TBPc7zpAUDBeUsqrEbqXpACg9hKXAYzCy6", "fee": 1000000, "feeAssetId": null, "timestamp": 1609838395156, "version": 2, "chainId": 84, "sender": "3N5SvV5gLbCNEM8hLKhajqK7G2S44CwAHeR", "senderPublicKey": "CS5EXJsCzXJdSvUdPSL8r7VcrzDLDnTNmCQR2UDxhNyd", "proofs": [ "Lh9fGvX2Q51rxqFBNRSxWmGQX7CRjHSBQdLtBoMaqbsPAWWx18YpACLRwD3xVSWjZW7VBwVLir6vws94VgDVQyc" ], "script": "base64:AAIEAAAAAAAAACgIAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIECgIICBIDCgEIAAAAHAAAAAAFY2hyaXMCAAAAIzNNc0c2alBOQ3JWSlV0WUI3WEpCeFM3dXRXc1hBZjRuOVZwAAAAAARqb2VwAgAAACMzTXptNFZMd3NOOXVad2JUTXpQajNYdXhWNmtFZkFSOFVETgAAAAAOZGFwcFJ1bm5pbmdLZXkCAAAAFGNvbmZfZGFwcF9pc19ydW5uaW5nAAAAABFtYWludGVuYW5jZU1TR0tleQIAAAAUY29uZl9tYWludGVuYW5jZV9tc2cAAAAAEndoaXRlbGlzdGVkb25seUtleQIAAAAVY29uZl93aGl0ZWxpc3RlZF9vbmx5AAAAAAtkYXBwUnVubmluZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAR0aGlzBQAAAA5kYXBwUnVubmluZ0tleQYAAAAADm1haW50ZW5hbmNlTVNHCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAEW1haW50ZW5hbmNlTVNHS2V5AgAAAAAAA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AAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAADWtleVVzZXJTdGF0dXMAAAABBQAAAAdhZGRyZXNzBQAAAAt1c2VyUmVtb3ZlZAUAAAADbmlsCQAAAgAAAAECAAAAC05vdCBhbGxvd2VkAAAAAMzR6j0=", "height": 1339897, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
5 | + | ||
6 | + | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
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 userAllowed = "ALLOWED" | |
21 | + | ||
22 | + | let userRegistered = "REGISTERED" | |
23 | + | ||
24 | + | let userVerified = "VERIFIED" | |
25 | + | ||
26 | + | let userSuspended = "SUSPENDED" | |
27 | + | ||
28 | + | let userRemoved = "REMOVED" | |
29 | + | ||
30 | + | let userChangeRequired = "CHANGE_REQUIRED" | |
31 | + | ||
32 | + | let userUnregistered = "UNREGISTERED" | |
33 | + | ||
34 | + | let userReset = "RESET" | |
35 | + | ||
36 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
37 | + | ||
38 | + | ||
39 | + | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
40 | + | ||
41 | + | ||
42 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
43 | + | ||
44 | + | ||
45 | + | func keyUserAddr (caller) = ("user_" + caller) | |
46 | + | ||
47 | + | ||
48 | + | func keyUserName (caller) = ("user_name_" + caller) | |
49 | + | ||
50 | + | ||
51 | + | func keyUserDesc (caller) = ("user_desc_" + caller) | |
52 | + | ||
53 | + | ||
54 | + | func keyUserSocial (caller) = ("user_social_" + caller) | |
55 | + | ||
56 | + | ||
57 | + | func keyUserThumb (caller) = ("user_thumb_" + caller) | |
58 | + | ||
59 | + | ||
60 | + | func keyUserStatus (caller) = ("user_status_" + caller) | |
61 | + | ||
62 | + | ||
63 | + | func keyUserDate (caller) = ("user_date_" + caller) | |
64 | + | ||
65 | + | ||
66 | + | func validUserData (caller,name,description,isAnUpdate) = if (if ((name == "")) | |
67 | + | then true | |
68 | + | else (description == "")) | |
69 | + | then throw("Name and description cannot be empty") | |
70 | + | else if ((size(description) > 600)) | |
71 | + | then throw("600 Char. max description") | |
72 | + | else if ((size(name) > 45)) | |
73 | + | then throw("45 Char. max name") | |
74 | + | else { | |
75 | + | let status = getStringByKey(keyUserStatus(caller)) | |
76 | + | if (if ((status == userSuspended)) | |
77 | + | then true | |
78 | + | else (status == userRemoved)) | |
79 | + | then throw("Account suspended/ removed.") | |
80 | + | else if (if (!(isAnUpdate)) | |
81 | + | then (status == userRegistered) | |
82 | + | else false) | |
83 | + | then throw("Already registered") | |
84 | + | else if (if (if (!(isAnUpdate)) | |
85 | + | then (status == "") | |
86 | + | else false) | |
87 | + | then whitelistedonly | |
88 | + | else false) | |
89 | + | then throw("Can't register, get approved first.") | |
90 | + | else if (if (if (isAnUpdate) | |
91 | + | then (status == "") | |
92 | + | else false) | |
93 | + | then true | |
94 | + | else (status == userAllowed)) | |
95 | + | then throw("Register first") | |
96 | + | else true | |
97 | + | } | |
98 | + | ||
99 | + | ||
100 | + | func validateNewStatus (status,address,currentStatus) = { | |
101 | + | let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired] | |
102 | + | let statusToSet = if (containsElement(allStatus, status)) | |
103 | + | then status | |
104 | + | else if (if ((status == userReset)) | |
105 | + | then (currentStatus == userAllowed) | |
106 | + | else false) | |
107 | + | then "" | |
108 | + | else throw("Unknown status") | |
109 | + | let userIsRegistered = getIntegerByKey(keyUserDate(address)) | |
110 | + | if (if ((userIsRegistered == 0)) | |
111 | + | then (status != userAllowed) | |
112 | + | else false) | |
113 | + | then throw("You cant set this status, user is not registered.") | |
114 | + | else if (if ((currentStatus == userAllowed)) | |
115 | + | then (status == userAllowed) | |
116 | + | else false) | |
117 | + | then throw("User already allowed") | |
118 | + | else if (if ((currentStatus == userRegistered)) | |
119 | + | then (status == userAllowed) | |
120 | + | else false) | |
121 | + | then throw("User already allowed & registered") | |
122 | + | else if (if ((currentStatus == userVerified)) | |
123 | + | then (status == userAllowed) | |
124 | + | else false) | |
125 | + | then throw("User already allowed & verified") | |
126 | + | else true | |
127 | + | } | |
128 | + | ||
129 | + | ||
130 | + | @Callable(i) | |
131 | + | func appRunning (isLive,message) = { | |
132 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
133 | + | let id = toBase58String(i.transactionId) | |
134 | + | if (containsElement([chris, joep, toString(this)], caller)) | |
135 | + | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
136 | + | else throw("You are not allowed to change this") | |
137 | + | } | |
138 | + | ||
139 | + | ||
140 | + | ||
141 | + | @Callable(i) | |
142 | + | func registrationMode (WLonly) = { | |
143 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
144 | + | let id = toBase58String(i.transactionId) | |
145 | + | if (containsElement([chris, toString(this)], caller)) | |
146 | + | then [BooleanEntry(whitelistedonlyKey, WLonly)] | |
147 | + | else throw("You are not allowed to change this") | |
148 | + | } | |
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | @Callable(i) | |
153 | + | func registerUser (name,description,thumb,social) = if (!(dappRunning)) | |
154 | + | then throw(maintenanceMSG) | |
155 | + | else { | |
156 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
157 | + | let id = toBase58String(i.transactionId) | |
158 | + | let timestamp = lastBlock.timestamp | |
159 | + | if (!(validUserData(caller, name, description, false))) | |
160 | + | then throw("Something went wrong") | |
161 | + | else { | |
162 | + | let json = (((((("{\"user_name\": \"" + toBase64String(toBytes(name))) + "\", \"user_thumb\":\"") + toBase64String(toBytes(thumb))) + "\",\"user_date\":\"") + toString(timestamp)) + "\"}") | |
163 | + | [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)] | |
164 | + | } | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | @Callable(i) | |
170 | + | func updateUser (name,description,thumb,social) = if (!(dappRunning)) | |
171 | + | then throw(maintenanceMSG) | |
172 | + | else { | |
173 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
174 | + | let id = toBase58String(i.transactionId) | |
175 | + | let status = getStringByKey(keyUserStatus(caller)) | |
176 | + | if (!(validUserData(caller, name, description, true))) | |
177 | + | then throw("Something went wrong") | |
178 | + | else { | |
179 | + | let date = getIntegerByKey(keyUserDate(caller)) | |
180 | + | let json = (((((("{\"user_name\": \"" + toBase64String(toBytes(name))) + "\", \"user_thumb\":\"") + toBase64String(toBytes(thumb))) + "\",\"user_date\":\"") + toString(date)) + "\"}") | |
181 | + | [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), StringEntry(((status + "_") + caller), json)] | |
182 | + | } | |
183 | + | } | |
184 | + | ||
185 | + | ||
186 | + | ||
187 | + | @Callable(i) | |
188 | + | func changeUserStatus (address,status) = if (!(dappRunning)) | |
189 | + | then throw(maintenanceMSG) | |
190 | + | else { | |
191 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
192 | + | let id = toBase58String(i.transactionId) | |
193 | + | let currentStatus = getStringByKey(keyUserStatus(address)) | |
194 | + | let statusToSet = if (!(validateNewStatus(status, address, currentStatus))) | |
195 | + | then throw("Something went wrong!") | |
196 | + | else status | |
197 | + | let name = toBase64String(toBytes(getStringByKey(keyUserName(address)))) | |
198 | + | let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address)))) | |
199 | + | let date = getIntegerByKey(keyUserDate(address)) | |
200 | + | let json = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + toString(date)) + "\"}") | |
201 | + | if (containsElement([chris, joep, toString(this)], caller)) | |
202 | + | then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json)] | |
203 | + | else throw("Not allowed to change user status") | |
204 | + | } | |
205 | + | ||
206 | + | ||
207 | + | ||
208 | + | @Callable(i) | |
209 | + | func deleteUser (address) = { | |
210 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
211 | + | let id = toBase58String(i.transactionId) | |
212 | + | let currentStatus = getStringByKey(keyUserStatus(address)) | |
213 | + | if (containsElement([chris, toString(this)], caller)) | |
214 | + | 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)] | |
215 | + | else throw("Not allowed") | |
216 | + | } | |
217 | + | ||
218 | + |
github/deemru/w8io/026f985 22.27 ms ◑