tx · 2fJifczpEwhKC8xoHRFLcuqgqGwNFNovRiXGAgLzAQUb

3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj:  -0.01400000 Waves

2020.12.09 07:08 [1300622] smart account 3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj > SELF 0.00000000 Waves

{ "type": 13, "id": "2fJifczpEwhKC8xoHRFLcuqgqGwNFNovRiXGAgLzAQUb", "fee": 1400000, "feeAssetId": null, "timestamp": 1607486908714, "version": 2, "chainId": 84, "sender": "3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj", "senderPublicKey": "A2m227AHcq7gWfSU59Q3UJaqkEa7SccFYmJuWHbFrrKE", "proofs": [ "2ZrdneqHXbSE8uc8wDVkBeqgeXbnHwzpKNQ5MHf3JrbwCNxb3o5Fg2qXSToD9zwUTs64Mg8PF8iBWeMhsCYX1KRQ" ], "script": "base64:AAIEAAAAAAAAADIIAhIECgIECBIDCgEEEgYKBAgICAgSBgoECAgICBIECgIICBIDCgEIEgMKAQgSAwoBCAAAABwBAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAPZ2V0Qm9vbGVhbkJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBwEAAAAPZ2V0SW50ZWdlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWkFAAAAByRtYXRjaDAFAAAAAW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zCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAA1rZXlVc2VyU29jaWFsAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAMa2V5VXNlclRodW1iAAAAAQUAAAAHYWRkcmVzcwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAANa2V5VXNlclN0YXR1cwAAAAEFAAAAB2FkZHJlc3MFAAAAC3VzZXJSZW1vdmVkBQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAABaQEAAAALZGVsZXRlRW50cnkAAAABAAAABWVudHJ5BAAAAAZjYWxsZXIJAAQlAAAAAQkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkAAAAAAAACBQAAAAZjYWxsZXIFAAAABWNocmlzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAABWVudHJ5BQAAAANuaWwJAAACAAAAAQIAAAACbm8AAAAAwnRaVw==", "height": 1300622, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B72PPuUBuHQFvxsfyi61v3jTLEMN8HpXoH192CZKiVHr Next: 4eSPSjkGxbdm2SqLqX5w8itinbFSmaLHG3tK4CFSz9rt Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
5-
6-let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
7-
8-let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
9-
10-let WHITELISTEDONLY = true
11-
12-let dappRunning = true
13-
14-let maintenanceMSG = "SIGN Art is under maintenance"
15-
16-let userAllowed = "ALLOWED"
17-
18-let userRegistered = "REGISTERED"
19-
20-let userVerified = "VERIFIED"
21-
22-let userSuspended = "SUSPENDED"
23-
24-let userRemoved = "REMOVED"
25-
26-let userChangeRequired = "CHANGE_REQUIRED"
27-
28-let userUnregistered = "UNREGISTERED"
29-
30-let userReset = "RESET"
31-
324 func getStringByKey (key) = match getString(this, key) {
335 case a: String =>
346 a
357 case _ =>
368 ""
9+}
10+
11+
12+func getBooleanByKey (key) = match getBoolean(this, key) {
13+ case a: Boolean =>
14+ a
15+ case _ =>
16+ false
3717 }
3818
3919
5131 then (16 > size(split(cid, "/")[1]))
5232 else false
5333
34+
35+let dappRunningKey = "conf_dapp_is_running"
36+
37+let maintenanceMSGKey = "conf_maintenance_msg"
38+
39+let whitelistedonlyKey = "conf_whitelisted_only"
40+
41+let dappRunning = getBooleanByKey(dappRunningKey)
42+
43+let maintenanceMSG = getStringByKey(maintenanceMSGKey)
44+
45+let whitelistedonly = getBooleanByKey(whitelistedonlyKey)
46+
47+let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
48+
49+let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
50+
51+let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
52+
53+let userAllowed = "ALLOWED"
54+
55+let userRegistered = "REGISTERED"
56+
57+let userVerified = "VERIFIED"
58+
59+let userSuspended = "SUSPENDED"
60+
61+let userRemoved = "REMOVED"
62+
63+let userChangeRequired = "CHANGE_REQUIRED"
64+
65+let userUnregistered = "UNREGISTERED"
66+
67+let userReset = "RESET"
5468
5569 func keyUserAddr (caller) = ("user_" + caller)
5670
7488
7589
7690 @Callable(i)
91+func maintenance (status,msg) = {
92+ let caller = toString(addressFromPublicKey(i.callerPublicKey))
93+ let id = toBase58String(i.transactionId)
94+ if (containsElement([chris, joep, toString(this)], caller))
95+ then [BooleanEntry("conf_dapp_is_running", status), StringEntry("conf_maintenance_msg", msg)]
96+ else throw("You are not allowed to change this")
97+ }
98+
99+
100+
101+@Callable(i)
102+func registrationMode (whitelistedonly) = {
103+ let caller = toString(addressFromPublicKey(i.callerPublicKey))
104+ let id = toBase58String(i.transactionId)
105+ if (containsElement([chris, joep, toString(this)], caller))
106+ then [BooleanEntry("conf_whitelisted_only", whitelistedonly)]
107+ else throw("You are not allowed to change this")
108+ }
109+
110+
111+
112+@Callable(i)
77113 func registerUser (name,description,thumb,social) = if (!(dappRunning))
78114 then throw(maintenanceMSG)
79115 else {
88124 else if ((canRegister == userRegistered))
89125 then throw("Already registered")
90126 else if (if ((canRegister == ""))
91- then WHITELISTEDONLY
127+ then whitelistedonly
92128 else false)
93129 then throw("Can't register, get approved first.")
94130 else if (if ((name == ""))
173209 then (status == userAllowed)
174210 else false)
175211 then throw("User already allowed & verified")
176- else if (containsElement([chris, joep], caller))
212+ else if (containsElement([chris, joep, toString(this)], caller))
177213 then [StringEntry(keyUserStatus(address), statusToSet)]
178- else throw(((("Not allowed to change user status " + caller) + " / ") + chris))
214+ else throw("Not allowed to change user status")
179215 }
180216
181217
195231 func deleteUser (address) = {
196232 let caller = toString(addressFromPublicKey(i.callerPublicKey))
197233 let id = toBase58String(i.transactionId)
198- if (containsElement([chris, joep], caller))
234+ if (containsElement([chris, joep, toString(this)], caller))
199235 then [DeleteEntry(keyUserDate(address)), DeleteEntry(keyUserAddr(address)), DeleteEntry(keyUserName(address)), DeleteEntry(keyUserDesc(address)), DeleteEntry(keyUserSocial(address)), DeleteEntry(keyUserThumb(address)), StringEntry(keyUserStatus(address), userRemoved)]
200236 else throw("Not allowed")
201237 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
5-
6-let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
7-
8-let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
9-
10-let WHITELISTEDONLY = true
11-
12-let dappRunning = true
13-
14-let maintenanceMSG = "SIGN Art is under maintenance"
15-
16-let userAllowed = "ALLOWED"
17-
18-let userRegistered = "REGISTERED"
19-
20-let userVerified = "VERIFIED"
21-
22-let userSuspended = "SUSPENDED"
23-
24-let userRemoved = "REMOVED"
25-
26-let userChangeRequired = "CHANGE_REQUIRED"
27-
28-let userUnregistered = "UNREGISTERED"
29-
30-let userReset = "RESET"
31-
324 func getStringByKey (key) = match getString(this, key) {
335 case a: String =>
346 a
357 case _ =>
368 ""
9+}
10+
11+
12+func getBooleanByKey (key) = match getBoolean(this, key) {
13+ case a: Boolean =>
14+ a
15+ case _ =>
16+ false
3717 }
3818
3919
4020 func getIntegerByKey (key) = match getInteger(this, key) {
4121 case i: Int =>
4222 i
4323 case _ =>
4424 0
4525 }
4626
4727
4828 func validateCID (cid) = if (if ((75 > size(cid)))
4929 then (60 > size(split(cid, "/")[0]))
5030 else false)
5131 then (16 > size(split(cid, "/")[1]))
5232 else false
5333
34+
35+let dappRunningKey = "conf_dapp_is_running"
36+
37+let maintenanceMSGKey = "conf_maintenance_msg"
38+
39+let whitelistedonlyKey = "conf_whitelisted_only"
40+
41+let dappRunning = getBooleanByKey(dappRunningKey)
42+
43+let maintenanceMSG = getStringByKey(maintenanceMSGKey)
44+
45+let whitelistedonly = getBooleanByKey(whitelistedonlyKey)
46+
47+let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
48+
49+let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
50+
51+let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
52+
53+let userAllowed = "ALLOWED"
54+
55+let userRegistered = "REGISTERED"
56+
57+let userVerified = "VERIFIED"
58+
59+let userSuspended = "SUSPENDED"
60+
61+let userRemoved = "REMOVED"
62+
63+let userChangeRequired = "CHANGE_REQUIRED"
64+
65+let userUnregistered = "UNREGISTERED"
66+
67+let userReset = "RESET"
5468
5569 func keyUserAddr (caller) = ("user_" + caller)
5670
5771
5872 func keyUserName (caller) = ("user_name_" + caller)
5973
6074
6175 func keyUserDesc (caller) = ("user_desc_" + caller)
6276
6377
6478 func keyUserSocial (caller) = ("user_social_" + caller)
6579
6680
6781 func keyUserThumb (caller) = ("user_thumb_" + caller)
6882
6983
7084 func keyUserStatus (caller) = ("user_status_" + caller)
7185
7286
7387 func keyUserDate (caller) = ("user_date_" + caller)
7488
7589
7690 @Callable(i)
91+func maintenance (status,msg) = {
92+ let caller = toString(addressFromPublicKey(i.callerPublicKey))
93+ let id = toBase58String(i.transactionId)
94+ if (containsElement([chris, joep, toString(this)], caller))
95+ then [BooleanEntry("conf_dapp_is_running", status), StringEntry("conf_maintenance_msg", msg)]
96+ else throw("You are not allowed to change this")
97+ }
98+
99+
100+
101+@Callable(i)
102+func registrationMode (whitelistedonly) = {
103+ let caller = toString(addressFromPublicKey(i.callerPublicKey))
104+ let id = toBase58String(i.transactionId)
105+ if (containsElement([chris, joep, toString(this)], caller))
106+ then [BooleanEntry("conf_whitelisted_only", whitelistedonly)]
107+ else throw("You are not allowed to change this")
108+ }
109+
110+
111+
112+@Callable(i)
77113 func registerUser (name,description,thumb,social) = if (!(dappRunning))
78114 then throw(maintenanceMSG)
79115 else {
80116 let caller = toString(addressFromPublicKey(i.callerPublicKey))
81117 let canRegister = getStringByKey(keyUserStatus(caller))
82118 let id = toBase58String(i.transactionId)
83119 let timestamp = lastBlock.timestamp
84120 if (if ((canRegister == userSuspended))
85121 then true
86122 else (canRegister == userRemoved))
87123 then throw("Account suspended/ removed.")
88124 else if ((canRegister == userRegistered))
89125 then throw("Already registered")
90126 else if (if ((canRegister == ""))
91- then WHITELISTEDONLY
127+ then whitelistedonly
92128 else false)
93129 then throw("Can't register, get approved first.")
94130 else if (if ((name == ""))
95131 then true
96132 else (description == ""))
97133 then throw("Name and description cannot be empty")
98134 else if ((size(description) > 600))
99135 then throw("600 Char. max description")
100136 else if ((size(name) > 45))
101137 then throw("45 Char. max name")
102138 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)]
103139 }
104140
105141
106142
107143 @Callable(i)
108144 func updateUser (name,description,thumb,social) = if (!(dappRunning))
109145 then throw(maintenanceMSG)
110146 else {
111147 let caller = toString(addressFromPublicKey(i.callerPublicKey))
112148 let id = toBase58String(i.transactionId)
113149 let canUpdate = getStringByKey(keyUserStatus(caller))
114150 if (if ((canUpdate == userSuspended))
115151 then true
116152 else (canUpdate == userRemoved))
117153 then throw("Account suspended/ removed.")
118154 else if (if ((canUpdate == ""))
119155 then true
120156 else (canUpdate == userAllowed))
121157 then throw("Register first")
122158 else if (if ((name == ""))
123159 then true
124160 else (description == ""))
125161 then throw("Name & description cannot be empty")
126162 else if ((size(description) > 600))
127163 then throw("600 Char. max for description")
128164 else if ((size(name) > 45))
129165 then throw("45 Char. max name")
130166 else [StringEntry(keyUserName(caller), name), StringEntry(keyUserDesc(caller), description), StringEntry(keyUserSocial(caller), social), StringEntry(keyUserThumb(caller), thumb)]
131167 }
132168
133169
134170
135171 @Callable(i)
136172 func changeUserStatus (address,status) = if (!(dappRunning))
137173 then throw(maintenanceMSG)
138174 else {
139175 let caller = toString(addressFromPublicKey(i.callerPublicKey))
140176 let id = toBase58String(i.transactionId)
141177 let currentStatus = getStringByKey(keyUserStatus(address))
142178 let statusToSet = if ((status == userVerified))
143179 then userVerified
144180 else if ((status == userRegistered))
145181 then userRegistered
146182 else if ((status == userSuspended))
147183 then userSuspended
148184 else if ((status == userRemoved))
149185 then userRemoved
150186 else if ((status == userAllowed))
151187 then userAllowed
152188 else if ((status == userChangeRequired))
153189 then userChangeRequired
154190 else if (if ((status == userReset))
155191 then (currentStatus == userAllowed)
156192 else false)
157193 then ""
158194 else throw("Unknown status")
159195 let userIsRegistered = getIntegerByKey(keyUserDate(address))
160196 if (if ((userIsRegistered == 0))
161197 then (status != userAllowed)
162198 else false)
163199 then throw("You cant set this status, user is not registered.")
164200 else if (if ((currentStatus == userAllowed))
165201 then (status == userAllowed)
166202 else false)
167203 then throw("User already allowed")
168204 else if (if ((currentStatus == userRegistered))
169205 then (status == userAllowed)
170206 else false)
171207 then throw("User already allowed & registered")
172208 else if (if ((currentStatus == userVerified))
173209 then (status == userAllowed)
174210 else false)
175211 then throw("User already allowed & verified")
176- else if (containsElement([chris, joep], caller))
212+ else if (containsElement([chris, joep, toString(this)], caller))
177213 then [StringEntry(keyUserStatus(address), statusToSet)]
178- else throw(((("Not allowed to change user status " + caller) + " / ") + chris))
214+ else throw("Not allowed to change user status")
179215 }
180216
181217
182218
183219 @Callable(i)
184220 func creditUser (address) = {
185221 let caller = toString(addressFromPublicKey(i.callerPublicKey))
186222 let id = toBase58String(i.transactionId)
187223 if (containsElement([chris, joep], caller))
188224 then [ScriptTransfer(Address(fromBase58String(address)), 30000000000, signAssetId)]
189225 else throw("Not allowed")
190226 }
191227
192228
193229
194230 @Callable(i)
195231 func deleteUser (address) = {
196232 let caller = toString(addressFromPublicKey(i.callerPublicKey))
197233 let id = toBase58String(i.transactionId)
198- if (containsElement([chris, joep], caller))
234+ if (containsElement([chris, joep, toString(this)], caller))
199235 then [DeleteEntry(keyUserDate(address)), DeleteEntry(keyUserAddr(address)), DeleteEntry(keyUserName(address)), DeleteEntry(keyUserDesc(address)), DeleteEntry(keyUserSocial(address)), DeleteEntry(keyUserThumb(address)), StringEntry(keyUserStatus(address), userRemoved)]
200236 else throw("Not allowed")
201237 }
202238
203239
204240
205241 @Callable(i)
206242 func deleteEntry (entry) = {
207243 let caller = toString(addressFromPublicKey(i.callerPublicKey))
208244 if ((caller == chris))
209245 then [DeleteEntry(entry)]
210246 else throw("no")
211247 }
212248
213249

github/deemru/w8io/169f3d6 
48.80 ms