tx · 7W52WXvR5qxJizr2wfFF43dRCK5ETuQy1nL3LqPzSHeq 3NAJSvtVC3xCnqYTcz8xeTNeD7osfBWLUco: -0.01000000 Waves 2021.09.16 14:02 [1705517] smart account 3NAJSvtVC3xCnqYTcz8xeTNeD7osfBWLUco > SELF 0.00000000 Waves
{ "type": 13, "id": "7W52WXvR5qxJizr2wfFF43dRCK5ETuQy1nL3LqPzSHeq", "fee": 1000000, "feeAssetId": null, "timestamp": 1631790175077, "version": 2, "chainId": 84, "sender": "3NAJSvtVC3xCnqYTcz8xeTNeD7osfBWLUco", "senderPublicKey": "GnNm7G9qjgFZmmZvHcFBPtq9jxgTayho7FCTLfH1mA27", "proofs": [ "4TUEwCFWkQ9nXf3TjLFhoqZNZQVT6Xe9ysJvTqZzqFxypevXUFmEN5StLQ9ec6c2pboz1VY7WefdHAJxBHoF2qmA" ], "script": "base64:AAIFAAAAAAAAACkIAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIFCgMICAgSAwoBCAAAAB4AAAAABm93bmVyMQIAAAAjM012U0trcW1Mak5hSkFZcnRlSkIzSG5tdThyOGcxc2pwWUYAAAAABm93bmVyMgIAAAAjM04xRGhxNVpaeW9valFpc3VUTHVzWWpuR2lzcXJ4RHdHTHkAAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAABJ3aGl0ZWxpc3RlZG9ubHlLZXkCAAAAFWNvbmZfd2hpdGVsaXN0ZWRfb25seQAAAAALZGFwcFJ1bm5pbmcJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAEdGhpcwUAAAAOZGFwcFJ1bm5pbmdLZXkGAAAAAA5tYWludGVuYW5jZU1TRwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAABFtYWludGVuYW5jZU1TR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bmdCeUtleQAAAAEJAQAAAA1rZXlVc2VyU3RhdHVzAAAAAQUAAAAHYWRkcmVzcwMJAQAAAA9jb250YWluc0VsZW1lbnQAAAACCQAETAAAAAIFAAAABm93bmVyMQkABEwAAAACBQAAAAZvd25lcjIJAARMAAAAAgkABCUAAAABBQAAAAR0aGlzBQAAAANuaWwFAAAABmNhbGxlcgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAALa2V5VXNlckRhdGUAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAtrZXlVc2VyQWRkcgAAAAEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAC2tleVVzZXJOYW1lAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAALa2V5VXNlckRlc2MAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAA1rZXlVc2VyU29jaWFsAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMa2V5VXNlclRodW1iAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAEsAAAAAgUAAAANY3VycmVudFN0YXR1cwIAAAABXwUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAANa2V5VXNlclN0YXR1cwAAAAEFAAAAB2FkZHJlc3MFAAAAC3VzZXJSZW1vdmVkBQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAAAUgsQdg==", "height": 1705517, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let owner1 = "3MvSKkqmLjNaJAYrteJB3Hnmu8r8g1sjpYF" | |
5 | + | ||
6 | + | let owner2 = "3N1Dhq5ZZyoojQisuTLusYjnGisqrxDwGLy" | |
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 validateCID (cid) = if (contains(cid, "/")) | |
67 | + | then if (if ((76 > size(cid))) | |
68 | + | then (size(split(cid, "/")[0]) == 59) | |
69 | + | else false) | |
70 | + | then (16 > size(split(cid, "/")[1])) | |
71 | + | else false | |
72 | + | else false | |
73 | + | ||
74 | + | ||
75 | + | func validUserData (caller,name,description,thumb,isAnUpdate) = { | |
76 | + | let validCID = if ((size(thumb) != 0)) | |
77 | + | then validateCID(thumb) | |
78 | + | else true | |
79 | + | if (!(validCID)) | |
80 | + | then throw("CID don't match requirement!") | |
81 | + | else if (if ((name == "")) | |
82 | + | then true | |
83 | + | else (description == "")) | |
84 | + | then throw("Name and description cannot be empty") | |
85 | + | else if ((size(description) > 600)) | |
86 | + | then throw("600 Char. max description") | |
87 | + | else if ((size(name) > 45)) | |
88 | + | then throw("45 Char. max name") | |
89 | + | else { | |
90 | + | let status = getStringByKey(keyUserStatus(caller)) | |
91 | + | if (if ((status == userSuspended)) | |
92 | + | then true | |
93 | + | else (status == userRemoved)) | |
94 | + | then throw("Account suspended/ removed.") | |
95 | + | else if (if (!(isAnUpdate)) | |
96 | + | then (status == userRegistered) | |
97 | + | else false) | |
98 | + | then throw("Already registered") | |
99 | + | else if (if (if (!(isAnUpdate)) | |
100 | + | then (status == "") | |
101 | + | else false) | |
102 | + | then whitelistedonly | |
103 | + | else false) | |
104 | + | then throw("Can't register, get approved first.") | |
105 | + | else if (if (if (isAnUpdate) | |
106 | + | then (status == "") | |
107 | + | else false) | |
108 | + | then true | |
109 | + | else if (isAnUpdate) | |
110 | + | then (status == userAllowed) | |
111 | + | else false) | |
112 | + | then throw("Register first") | |
113 | + | else true | |
114 | + | } | |
115 | + | } | |
116 | + | ||
117 | + | ||
118 | + | func validateNewStatus (status,address,currentStatus) = { | |
119 | + | let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userAllowed, userChangeRequired] | |
120 | + | let statusToSet = if (containsElement(allStatus, status)) | |
121 | + | then status | |
122 | + | else if (if ((status == userReset)) | |
123 | + | then (currentStatus == userAllowed) | |
124 | + | else false) | |
125 | + | then "" | |
126 | + | else throw("Unknown status") | |
127 | + | let userIsRegistered = getIntegerByKey(keyUserDate(address)) | |
128 | + | if (if ((userIsRegistered == 0)) | |
129 | + | then (statusToSet != userAllowed) | |
130 | + | else false) | |
131 | + | then throw("You cant set this status, user is not registered.") | |
132 | + | else if (if ((currentStatus == userAllowed)) | |
133 | + | then (statusToSet == userAllowed) | |
134 | + | else false) | |
135 | + | then throw("User already allowed") | |
136 | + | else if (if ((currentStatus == userRegistered)) | |
137 | + | then (statusToSet == userAllowed) | |
138 | + | else false) | |
139 | + | then throw("User already allowed & registered") | |
140 | + | else if (if ((currentStatus == userVerified)) | |
141 | + | then (statusToSet == userAllowed) | |
142 | + | else false) | |
143 | + | then throw("User already allowed & verified") | |
144 | + | else statusToSet | |
145 | + | } | |
146 | + | ||
147 | + | ||
148 | + | func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}") | |
149 | + | ||
150 | + | ||
151 | + | @Callable(invoke) | |
152 | + | func appRunning (isLive,message) = { | |
153 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
154 | + | let id = toBase58String(invoke.transactionId) | |
155 | + | if (containsElement([owner1, owner2, toString(this)], caller)) | |
156 | + | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
157 | + | else throw("You are not allowed to change this") | |
158 | + | } | |
159 | + | ||
160 | + | ||
161 | + | ||
162 | + | @Callable(invoke) | |
163 | + | func registrationMode (WLonly) = { | |
164 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
165 | + | let id = toBase58String(invoke.transactionId) | |
166 | + | if (containsElement([owner1, owner2, toString(this)], caller)) | |
167 | + | then [BooleanEntry(whitelistedonlyKey, WLonly)] | |
168 | + | else throw("You are not allowed to change this") | |
169 | + | } | |
170 | + | ||
171 | + | ||
172 | + | ||
173 | + | @Callable(invoke) | |
174 | + | func registerUser (name,description,thumb,social) = if (!(dappRunning)) | |
175 | + | then throw(maintenanceMSG) | |
176 | + | else { | |
177 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
178 | + | let id = toBase58String(invoke.transactionId) | |
179 | + | let timestamp = lastBlock.timestamp | |
180 | + | if (!(validUserData(caller, name, description, thumb, false))) | |
181 | + | then throw("Something went wrong") | |
182 | + | else { | |
183 | + | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp)) | |
184 | + | [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)] | |
185 | + | } | |
186 | + | } | |
187 | + | ||
188 | + | ||
189 | + | ||
190 | + | @Callable(invoke) | |
191 | + | func updateUser (name,description,thumb,social) = if (!(dappRunning)) | |
192 | + | then throw(maintenanceMSG) | |
193 | + | else { | |
194 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
195 | + | let id = toBase58String(invoke.transactionId) | |
196 | + | let status = getStringByKey(keyUserStatus(caller)) | |
197 | + | if (!(validUserData(caller, name, description, thumb, true))) | |
198 | + | then throw("Something went wrong") | |
199 | + | else { | |
200 | + | let date = getIntegerByKey(keyUserDate(caller)) | |
201 | + | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date)) | |
202 | + | [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb), StringEntry(((status + "_") + caller), json)] | |
203 | + | } | |
204 | + | } | |
205 | + | ||
206 | + | ||
207 | + | ||
208 | + | @Callable(invoke) | |
209 | + | func changeUserStatus (address,status,note) = { | |
210 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
211 | + | let id = toBase58String(invoke.transactionId) | |
212 | + | let addr = addressFromString(address) | |
213 | + | match addr { | |
214 | + | case addr: Address => | |
215 | + | let currentStatus = getStringByKey(keyUserStatus(address)) | |
216 | + | let statusToSet = validateNewStatus(status, address, currentStatus) | |
217 | + | let name = toBase64String(toBytes(getStringByKey(keyUserName(address)))) | |
218 | + | let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address)))) | |
219 | + | let date = getIntegerByKey(keyUserDate(address)) | |
220 | + | let json = makeJSON(name, thumb, toString(date)) | |
221 | + | if (containsElement([owner1, owner2, toString(this)], caller)) | |
222 | + | then [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)] | |
223 | + | else throw("Not allowed to change user status") | |
224 | + | case _ => | |
225 | + | throw("Seems to be an invalid address!") | |
226 | + | } | |
227 | + | } | |
228 | + | ||
229 | + | ||
230 | + | ||
231 | + | @Callable(invoke) | |
232 | + | func deleteUser (address) = { | |
233 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
234 | + | let id = toBase58String(invoke.transactionId) | |
235 | + | let currentStatus = getStringByKey(keyUserStatus(address)) | |
236 | + | if (containsElement([owner1, owner2, toString(this)], caller)) | |
237 | + | 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)] | |
238 | + | else throw("Not allowed") | |
239 | + | } | |
240 | + | ||
241 | + |
github/deemru/w8io/026f985 28.17 ms ◑