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