tx · 3DoAavhzuc2ypXbtqW7qNxgTr2MrLF5nXUPawTWq7zYE 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj: -0.01400000 Waves 2020.12.09 07:43 [1300661] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves
{ "type": 13, "id": "3DoAavhzuc2ypXbtqW7qNxgTr2MrLF5nXUPawTWq7zYE", "fee": 1400000, "feeAssetId": null, "timestamp": 1607489005175, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "38Fzk5KzqkRUpVVuR1nQUyiAejN4YAZoy4BGiYnxGh5zGJqd4zrCqdeEcsjuHk8e5ATGgraRnMRFmFzepfk8Nw4q" ], "script": "base64:AAIEAAAAAAAAADIIAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIECgIICBIDCgEIEgMKAQgSAwoBCAAAABwAAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAABJ3aGl0ZWxpc3RlZG9ubHlLZXkCAAAAFWNvbmZfd2hpdGVsaXN0ZWRfb25seQAAAAALZGFwcFJ1bm5pbmcEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAAOZGFwcFJ1bm5pbmdLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEGAAAAAA5tYWludGVuYW5jZU1TRwQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAABFtYWludGVuYW5jZU1TR0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0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HJ5AAAAAQkBAAAAC2tleVVzZXJBZGRyAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAALa2V5VXNlck5hbWUAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAtrZXlVc2VyRGVzYwAAAAEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAADWtleVVzZXJTb2NpYWwAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAxrZXlVc2VyVGh1bWIAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAA1rZXlVc2VyU3RhdHVzAAAAAQUAAAAHYWRkcmVzcwUAAAALdXNlclJlbW92ZWQFAAAAA25pbAkAAAIAAAABAgAAAAtOb3QgYWxsb3dlZAAAAAFpAQAAAAtkZWxldGVFbnRyeQAAAAEAAAAFZW50cnkEAAAABmNhbGxlcgkABCUAAAABCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkDCQAAAAAAAAIFAAAABmNhbGxlcgUAAAAFY2hyaXMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAFZW50cnkFAAAAA25pbAkAAAIAAAABAgAAAAJubwAAAADFO1mB", "height": 1300661, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 83geuWDdtp2aDqcmBo8swMRtoJoYyMxqj7uXH5LxpQp6 Next: J3yCdkJNnr3AKbBsHUhLsswYanALPk7FLZ1zZRZWWLiG Diff:
Old | New | Differences | |
---|---|---|---|
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 | - | then [BooleanEntry(whitelistedonlyKey, | |
121 | + | then [BooleanEntry(whitelistedonlyKey, WLonly)] | |
122 | 122 | else throw("You are not allowed to change this") | |
123 | 123 | } | |
124 | 124 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let dappRunningKey = "conf_dapp_is_running" | |
5 | 5 | ||
6 | 6 | let maintenanceMSGKey = "conf_maintenance_msg" | |
7 | 7 | ||
8 | 8 | let whitelistedonlyKey = "conf_whitelisted_only" | |
9 | 9 | ||
10 | 10 | let dappRunning = match getBoolean(this, dappRunningKey) { | |
11 | 11 | case a: Boolean => | |
12 | 12 | a | |
13 | 13 | case _ => | |
14 | 14 | true | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | let maintenanceMSG = match getString(this, maintenanceMSGKey) { | |
18 | 18 | case a: String => | |
19 | 19 | a | |
20 | 20 | case _ => | |
21 | 21 | "" | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let whitelistedonly = match getBoolean(this, whitelistedonlyKey) { | |
25 | 25 | case a: Boolean => | |
26 | 26 | a | |
27 | 27 | case _ => | |
28 | 28 | true | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
32 | 32 | ||
33 | 33 | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
34 | 34 | ||
35 | 35 | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
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 | - | then [BooleanEntry(whitelistedonlyKey, | |
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 [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)] | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | ||
158 | 158 | @Callable(i) | |
159 | 159 | func updateUser (name,description,thumb,social) = if (!(dappRunning)) | |
160 | 160 | then throw(maintenanceMSG) | |
161 | 161 | else { | |
162 | 162 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
163 | 163 | let id = toBase58String(i.transactionId) | |
164 | 164 | let canUpdate = getStringByKey(keyUserStatus(caller)) | |
165 | 165 | if (if ((canUpdate == userSuspended)) | |
166 | 166 | then true | |
167 | 167 | else (canUpdate == userRemoved)) | |
168 | 168 | then throw("Account suspended/ removed.") | |
169 | 169 | else if (if ((canUpdate == "")) | |
170 | 170 | then true | |
171 | 171 | else (canUpdate == userAllowed)) | |
172 | 172 | then throw("Register first") | |
173 | 173 | else if (if ((name == "")) | |
174 | 174 | then true | |
175 | 175 | else (description == "")) | |
176 | 176 | then throw("Name & description cannot be empty") | |
177 | 177 | else if ((size(description) > 600)) | |
178 | 178 | then throw("600 Char. max for description") | |
179 | 179 | else if ((size(name) > 45)) | |
180 | 180 | then throw("45 Char. max name") | |
181 | 181 | else [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb)] | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(i) | |
187 | 187 | func changeUserStatus (address,status) = if (!(dappRunning)) | |
188 | 188 | then throw(maintenanceMSG) | |
189 | 189 | else { | |
190 | 190 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
191 | 191 | let id = toBase58String(i.transactionId) | |
192 | 192 | let currentStatus = getStringByKey(keyUserStatus(address)) | |
193 | 193 | let statusToSet = if ((status == userVerified)) | |
194 | 194 | then userVerified | |
195 | 195 | else if ((status == userRegistered)) | |
196 | 196 | then userRegistered | |
197 | 197 | else if ((status == userSuspended)) | |
198 | 198 | then userSuspended | |
199 | 199 | else if ((status == userRemoved)) | |
200 | 200 | then userRemoved | |
201 | 201 | else if ((status == userAllowed)) | |
202 | 202 | then userAllowed | |
203 | 203 | else if ((status == userChangeRequired)) | |
204 | 204 | then userChangeRequired | |
205 | 205 | else if (if ((status == userReset)) | |
206 | 206 | then (currentStatus == userAllowed) | |
207 | 207 | else false) | |
208 | 208 | then "" | |
209 | 209 | else throw("Unknown status") | |
210 | 210 | let userIsRegistered = getIntegerByKey(keyUserDate(address)) | |
211 | 211 | if (if ((userIsRegistered == 0)) | |
212 | 212 | then (status != userAllowed) | |
213 | 213 | else false) | |
214 | 214 | then throw("You cant set this status, user is not registered.") | |
215 | 215 | else if (if ((currentStatus == userAllowed)) | |
216 | 216 | then (status == userAllowed) | |
217 | 217 | else false) | |
218 | 218 | then throw("User already allowed") | |
219 | 219 | else if (if ((currentStatus == userRegistered)) | |
220 | 220 | then (status == userAllowed) | |
221 | 221 | else false) | |
222 | 222 | then throw("User already allowed & registered") | |
223 | 223 | else if (if ((currentStatus == userVerified)) | |
224 | 224 | then (status == userAllowed) | |
225 | 225 | else false) | |
226 | 226 | then throw("User already allowed & verified") | |
227 | 227 | else if (containsElement([chris, joep, toString(this)], caller)) | |
228 | 228 | then [StringEntry(keyUserStatus(address), statusToSet)] | |
229 | 229 | else throw("Not allowed to change user status") | |
230 | 230 | } | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | ||
234 | 234 | @Callable(i) | |
235 | 235 | func creditUser (address) = { | |
236 | 236 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
237 | 237 | let id = toBase58String(i.transactionId) | |
238 | 238 | if (containsElement([chris, joep], caller)) | |
239 | 239 | then [ScriptTransfer(Address(fromBase58String(address)), 30000000000, signAssetId)] | |
240 | 240 | else throw("Not allowed") | |
241 | 241 | } | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | ||
245 | 245 | @Callable(i) | |
246 | 246 | func deleteUser (address) = { | |
247 | 247 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
248 | 248 | let id = toBase58String(i.transactionId) | |
249 | 249 | if (containsElement([chris, joep, toString(this)], caller)) | |
250 | 250 | then [DeleteEntry(keyUserDate(address)), DeleteEntry(keyUserAddr(address)), DeleteEntry(keyUserName(address)), DeleteEntry(keyUserDesc(address)), DeleteEntry(keyUserSocial(address)), DeleteEntry(keyUserThumb(address)), StringEntry(keyUserStatus(address), userRemoved)] | |
251 | 251 | else throw("Not allowed") | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | ||
256 | 256 | @Callable(i) | |
257 | 257 | func deleteEntry (entry) = { | |
258 | 258 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
259 | 259 | if ((caller == chris)) | |
260 | 260 | then [DeleteEntry(entry)] | |
261 | 261 | else throw("no") | |
262 | 262 | } | |
263 | 263 | ||
264 | 264 |
github/deemru/w8io/026f985 69.34 ms ◑