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