tx · AQfreN4shEd6vvRNWSaTDUbWZ1RU544F3bYZtEnMRU5E 3ND2YaxBz74dJACBWLF8rFSxAkBfWDnaFez: -0.01000000 Waves 2022.05.15 17:14 [2052899] smart account 3ND2YaxBz74dJACBWLF8rFSxAkBfWDnaFez > SELF 0.00000000 Waves
{ "type": 13, "id": "AQfreN4shEd6vvRNWSaTDUbWZ1RU544F3bYZtEnMRU5E", "fee": 1000000, "feeAssetId": null, "timestamp": 1652624109711, "version": 2, "chainId": 84, "sender": "3ND2YaxBz74dJACBWLF8rFSxAkBfWDnaFez", "senderPublicKey": "D8HdKLZ9Q1iueozoQaG4yWxE5MxYTkFh9QS4xEwYxTCw", "proofs": [ "4mSTR3WZ2sDwKP4ZztpJGVtm87HYn1hx4MrgGv2j5Y1oSsp4MSatK1ZTAyeV4c8x6tpfKXrFg5Eo8zBvGFgMP19c" ], "script": "base64:AAIFAAAAAAAAADYIAhIDCgEIEgQKAgQIEgMKAQQSBwoFCAgICAgSBwoFCAgICAgSBgoECAgICBIDCgEIEgMKAQgAAAAkAAAAAAlvcmFjbGVLZXkCAAAACW9yYWNsZUtleQEAAAAGZ2V0U3RyAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAAAAAAGb3JhY2xlCQEAAAAGZ2V0U3RyAAAAAQUAAAAJb3JhY2xlS2V5AAAAAAlvcmFjbGVGZWUJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQUAAAAGb3JhY2xlAQAAABlnZXRJbnRlZ2VyQnlLZXlGcm9tT3JhY2xlAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABBoAAAACBQAAAAlvcmFjbGVGZWUFAAAAA2tleQIAAAAfSW50ZWdlciB1bmRlZmluZSBvciAwIGluIG9yYW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a2V5VXNlckRlc2MAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAA1rZXlVc2VyU29jaWFsAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMa2V5VXNlclRodW1iAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAEsAAAAAgUAAAANY3VycmVudFN0YXR1cwIAAAABXwUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAICAAAACWNhdGVnb3J5XwUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAANa2V5VXNlclN0YXR1cwAAAAEFAAAAB2FkZHJlc3MFAAAAC3VzZXJSZW1vdmVkBQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAABaQEAAAALZGVsZXRlRW50cnkAAAABAAAABWVudHJ5BAAAAAZjYWxsZXIJAAQlAAAAAQkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkBAAAAD2NvbnRhaW5zRWxlbWVudAAAAAIFAAAABm93bmVycwUAAAAGY2FsbGVyCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAABWVudHJ5BQAAAANuaWwJAAACAAAAAQIAAAACbm8AAAAAVCp0aw==", "height": 2052899, "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 oracleKey = "oracleKey" | |
5 | + | ||
6 | + | func getStr (key) = match getString(this, key) { | |
7 | + | case b: String => | |
8 | + | b | |
9 | + | case _ => | |
10 | + | "" | |
11 | + | } | |
12 | + | ||
13 | + | ||
14 | + | let oracle = getStr(oracleKey) | |
15 | + | ||
16 | + | let oracleFee = value(addressFromString(oracle)) | |
17 | + | ||
18 | + | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
19 | + | ||
20 | + | ||
21 | + | let stakeDapp = addressFromString(valueOrErrorMessage(getString(oracleFee, "stakeDapp"), "sconexDapp not found")) | |
22 | + | ||
23 | + | let owners = [getString(oracleFee, "owner1"), getString(oracleFee, "owner2")] | |
24 | + | ||
25 | + | let dappRunningKey = "conf_dapp_is_running" | |
26 | + | ||
27 | + | let maintenanceMSGKey = "conf_maintenance_msg" | |
28 | + | ||
29 | + | let whitelistedonlyKey = "conf_whitelisted_only" | |
30 | + | ||
31 | + | let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true) | |
32 | + | ||
33 | + | let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "") | |
34 | + | ||
35 | + | let whitelistedonly = valueOrElse(getBoolean(this, whitelistedonlyKey), true) | |
36 | + | ||
37 | + | let userRegistered = "REGISTERED" | |
38 | + | ||
39 | + | let userVerified = "VERIFIED" | |
40 | + | ||
41 | + | let userSuspended = "SUSPENDED" | |
42 | + | ||
43 | + | let userRemoved = "REMOVED" | |
44 | + | ||
45 | + | let userChangeRequired = "CHANGE_REQUIRED" | |
46 | + | ||
47 | + | let userUnregistered = "UNREGISTERED" | |
48 | + | ||
49 | + | let userReset = "RESET" | |
50 | + | ||
51 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
52 | + | ||
53 | + | ||
54 | + | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
55 | + | ||
56 | + | ||
57 | + | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
58 | + | ||
59 | + | ||
60 | + | func keyUserAddr (caller) = ("user_" + caller) | |
61 | + | ||
62 | + | ||
63 | + | func keyUserName (caller) = ("user_name_" + caller) | |
64 | + | ||
65 | + | ||
66 | + | func keyUserDesc (caller) = ("user_desc_" + caller) | |
67 | + | ||
68 | + | ||
69 | + | func keyUserSocial (caller) = ("user_social_" + caller) | |
70 | + | ||
71 | + | ||
72 | + | func keyUserThumb (caller) = ("user_thumb_" + caller) | |
73 | + | ||
74 | + | ||
75 | + | func keyUserBanner (caller) = ("user_banner_" + caller) | |
76 | + | ||
77 | + | ||
78 | + | func keyUserStatus (caller) = ("user_status_" + caller) | |
79 | + | ||
80 | + | ||
81 | + | func keyUserDate (caller) = ("user_date_" + caller) | |
82 | + | ||
83 | + | ||
84 | + | func validateCID (cid) = if (contains(cid, "/")) | |
85 | + | then if (if ((63 > size(cid))) | |
86 | + | then (size(split(cid, "/")[0]) == 46) | |
87 | + | else false) | |
88 | + | then (16 > size(split(cid, "/")[1])) | |
89 | + | else false | |
90 | + | else false | |
91 | + | ||
92 | + | ||
93 | + | func validateBanner (cid) = if ((size(cid) == 0)) | |
94 | + | then true | |
95 | + | else if ((size(cid) == 46)) | |
96 | + | then true | |
97 | + | else false | |
98 | + | ||
99 | + | ||
100 | + | func validUserData (caller,name,description,thumb,isAnUpdate) = { | |
101 | + | let validCID = if ((size(thumb) != 0)) | |
102 | + | then validateCID(thumb) | |
103 | + | else true | |
104 | + | if (!(validCID)) | |
105 | + | then throw("CID don't match requirement!") | |
106 | + | else if (if ((name == "")) | |
107 | + | then true | |
108 | + | else (description == "")) | |
109 | + | then throw("Name and description cannot be empty") | |
110 | + | else if ((size(description) > 600)) | |
111 | + | then throw("600 Char. max description") | |
112 | + | else if ((size(name) > 45)) | |
113 | + | then throw("45 Char. max name") | |
114 | + | else { | |
115 | + | let status = getStringByKey(keyUserStatus(caller)) | |
116 | + | if (if ((status == userSuspended)) | |
117 | + | then true | |
118 | + | else (status == userRemoved)) | |
119 | + | then throw("Account suspended/ removed.") | |
120 | + | else if (if (!(isAnUpdate)) | |
121 | + | then (status == userRegistered) | |
122 | + | else false) | |
123 | + | then throw("Already registered") | |
124 | + | else if (if (isAnUpdate) | |
125 | + | then (status == "") | |
126 | + | else false) | |
127 | + | then throw("Register first") | |
128 | + | else true | |
129 | + | } | |
130 | + | } | |
131 | + | ||
132 | + | ||
133 | + | func validateNewStatus (status,address,currentStatus) = { | |
134 | + | let allStatus = [userVerified, userRegistered, userSuspended, userRemoved, userChangeRequired] | |
135 | + | let statusToSet = if (containsElement(allStatus, status)) | |
136 | + | then status | |
137 | + | else if ((status == userReset)) | |
138 | + | then "" | |
139 | + | else throw("Unknown status") | |
140 | + | let userIsRegistered = getIntegerByKey(keyUserDate(address)) | |
141 | + | if ((userIsRegistered == 0)) | |
142 | + | then throw("You cant set this status, user is not registered.") | |
143 | + | else statusToSet | |
144 | + | } | |
145 | + | ||
146 | + | ||
147 | + | func makeJSON (name,thumb,date) = (((((("{\"user_name\": \"" + name) + "\", \"user_thumb\":\"") + thumb) + "\",\"user_date\":\"") + date) + "\"}") | |
148 | + | ||
149 | + | ||
150 | + | @Callable(i) | |
151 | + | func initDapp (dappKey) = if ((i.caller != this)) | |
152 | + | then throw("You cannot do this action") | |
153 | + | else if ((oracle != "")) | |
154 | + | then throw("oracle already set, you can't override!") | |
155 | + | else [StringEntry(oracleKey, dappKey)] | |
156 | + | ||
157 | + | ||
158 | + | ||
159 | + | @Callable(invoke) | |
160 | + | func appRunning (isLive,message) = { | |
161 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
162 | + | let id = toBase58String(invoke.transactionId) | |
163 | + | if (containsElement((owners :+ toString(this)), caller)) | |
164 | + | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
165 | + | else throw("You are not allowed to change this") | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | @Callable(invoke) | |
171 | + | func registrationMode (WLonly) = { | |
172 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
173 | + | let id = toBase58String(invoke.transactionId) | |
174 | + | if (containsElement((owners :+ toString(this)), caller)) | |
175 | + | then [BooleanEntry(whitelistedonlyKey, WLonly)] | |
176 | + | else throw("You are not allowed to change this") | |
177 | + | } | |
178 | + | ||
179 | + | ||
180 | + | ||
181 | + | @Callable(i) | |
182 | + | func registerUser (name,description,thumb,social,banner) = if (!(dappRunning)) | |
183 | + | then throw(maintenanceMSG) | |
184 | + | else { | |
185 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]]) | |
186 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
187 | + | then { | |
188 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
189 | + | let id = toBase58String(i.transactionId) | |
190 | + | let timestamp = lastBlock.timestamp | |
191 | + | if (!(validateBanner(banner))) | |
192 | + | then throw("Invalid banner image!") | |
193 | + | else if (!(validUserData(caller, name, description, thumb, false))) | |
194 | + | then throw("Something went wrong") | |
195 | + | else { | |
196 | + | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(timestamp)) | |
197 | + | [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(keyUserBanner(caller), banner), StringEntry(keyUserStatus(caller), userRegistered), StringEntry(((userRegistered + "_") + caller), json)] | |
198 | + | } | |
199 | + | } | |
200 | + | else throw("Strict value is not equal to itself.") | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | ||
205 | + | @Callable(i) | |
206 | + | func updateUser (name,description,thumb,social,banner) = if (!(dappRunning)) | |
207 | + | then throw(maintenanceMSG) | |
208 | + | else { | |
209 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]]) | |
210 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
211 | + | then { | |
212 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
213 | + | let id = toBase58String(i.transactionId) | |
214 | + | let status = getStringByKey(keyUserStatus(caller)) | |
215 | + | if (!(validateBanner(banner))) | |
216 | + | then throw("Invalid banner image!") | |
217 | + | else if (!(validUserData(caller, name, description, thumb, true))) | |
218 | + | then throw("Something went wrong") | |
219 | + | else { | |
220 | + | let date = getIntegerByKey(keyUserDate(caller)) | |
221 | + | let json = makeJSON(toBase64String(toBytes(name)), toBase64String(toBytes(thumb)), toString(date)) | |
222 | + | [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserBanner(caller), banner), StringEntry(keyUserThumb(caller), thumb), StringEntry(((status + "_") + caller), json)] | |
223 | + | } | |
224 | + | } | |
225 | + | else throw("Strict value is not equal to itself.") | |
226 | + | } | |
227 | + | ||
228 | + | ||
229 | + | ||
230 | + | @Callable(invoke) | |
231 | + | func changeUserStatus (address,status,note,category) = { | |
232 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
233 | + | let id = toBase58String(invoke.transactionId) | |
234 | + | let addr = addressFromString(address) | |
235 | + | match addr { | |
236 | + | case addr: Address => | |
237 | + | let currentStatus = getStringByKey(keyUserStatus(address)) | |
238 | + | let statusToSet = validateNewStatus(status, address, currentStatus) | |
239 | + | let name = toBase64String(toBytes(getStringByKey(keyUserName(address)))) | |
240 | + | let thumb = toBase64String(toBytes(getStringByKey(keyUserThumb(address)))) | |
241 | + | let date = getIntegerByKey(keyUserDate(address)) | |
242 | + | let json = makeJSON(name, thumb, toString(date)) | |
243 | + | if (containsElement((owners :+ toString(this)), caller)) | |
244 | + | then { | |
245 | + | let categoryData = if ((statusToSet == userVerified)) | |
246 | + | then [StringEntry(("category_" + address), category)] | |
247 | + | else [DeleteEntry(("category_" + address))] | |
248 | + | (categoryData ++ [StringEntry(keyUserStatus(address), statusToSet), DeleteEntry(((currentStatus + "_") + address)), StringEntry(((statusToSet + "_") + address), json), StringEntry(("user_note_" + address), note)]) | |
249 | + | } | |
250 | + | else throw("Not allowed to change user status") | |
251 | + | case _ => | |
252 | + | throw("Seems to be an invalid address!") | |
253 | + | } | |
254 | + | } | |
255 | + | ||
256 | + | ||
257 | + | ||
258 | + | @Callable(invoke) | |
259 | + | func deleteUser (address) = { | |
260 | + | let caller = toString(addressFromPublicKey(invoke.callerPublicKey)) | |
261 | + | let id = toBase58String(invoke.transactionId) | |
262 | + | let currentStatus = getStringByKey(keyUserStatus(address)) | |
263 | + | if (containsElement((owners :+ toString(this)), caller)) | |
264 | + | then [DeleteEntry(keyUserDate(address)), DeleteEntry(keyUserAddr(address)), DeleteEntry(keyUserName(address)), DeleteEntry(keyUserDesc(address)), DeleteEntry(keyUserSocial(address)), DeleteEntry(keyUserThumb(address)), DeleteEntry(((currentStatus + "_") + address)), DeleteEntry(("category_" + address)), StringEntry(keyUserStatus(address), userRemoved)] | |
265 | + | else throw("Not allowed") | |
266 | + | } | |
267 | + | ||
268 | + | ||
269 | + | ||
270 | + | @Callable(i) | |
271 | + | func deleteEntry (entry) = { | |
272 | + | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
273 | + | if (containsElement(owners, caller)) | |
274 | + | then [DeleteEntry(entry)] | |
275 | + | else throw("no") | |
276 | + | } | |
277 | + | ||
278 | + |
github/deemru/w8io/026f985 24.30 ms ◑