tx · DBprtJswhpzuF2F6XhPXjReUK2E2YDMGgUCfkwqvCXym 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib: -0.01000000 Waves 2022.08.10 09:04 [2177962] smart account 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib > SELF 0.00000000 Waves
{ "type": 13, "id": "DBprtJswhpzuF2F6XhPXjReUK2E2YDMGgUCfkwqvCXym", "fee": 1000000, "feeAssetId": null, "timestamp": 1660111443883, "version": 2, "chainId": 84, "sender": "3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib", "senderPublicKey": "3q3N8Kv49DbzNHyTB4A87UYz2DdquXCgP3GNCcD9Zj66", "proofs": [ "4UYJ2V2XtcoKoANsKU6xGqdvCk6wHZM3Ux9zf6suhig4Tj2vbNKzVWMr4YagR3h12zvf4vvPfGAQYHV12qTVhmYH" ], "script": "base64:AAIFAAAAAAAAAC0IAhIGCgQICAgIEgQKAggBEgQKAggIEgQKAggIEgQKAggIEgQKAgQIEgMKAQgAAAAxAAAAAAtDT05GX0lOSVRfSwIAAAALY29uZmlnX2luaXQAAAAAC0NPTkZfQU1JTl9LAgAAAAxjb25maWdfYWRtaW4AAAAADUNPTkZfT1JBQ0xFX0sCAAAADWNvbmZpZ19vcmFjbGUAAAAAE0NPTkZfQVJUV09SS19EQVBQX0sCAAAAE2NvbmZpZ19hcnR3b3JrX2RhcHAAAAAAEUNPTkZfVVNFUlNfREFQUF9LAgAAABFjb25maWdfdXNlcnNfZGFwcAAAAAAQQ09ORl9GRUVfQVNTRVRfSwIAAAAQY29uZmlnX2ZlZV9hc3NldAAAAAARQ09ORl9GRUVfQU1PVU5UX0sCAAAAEWNvbmZpZ19mZWVfYW1vdW50AAAAAA5kYXBwUnVubmluZ0tleQIAAAAUY29uZl9kYXBwX2lzX3J1bm5pbmcAAAAAEW1haW50ZW5hbmNlTVNHS2V5AgAAABRjb25mX21haW50ZW5hbmNlX21zZwAAAAALZGFwcFJ1bm5pbmcJAQAAAAt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c3RhdHVzAAAAAQUAAAAFbmZ0SWQFAAAAD3N0YXR1c19VTkxPQ0tFRAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQUAAAAJcmVjaXBpZW50AAAAAAAAAAABCQACWQAAAAEFAAAABW5mdElkBQAAAANuaWwJAAACAAAAAQIAAAALTm90IGFsbG93ZWQAAAABaQEAAAAKYXBwUnVubmluZwAAAAIAAAAGaXNMaXZlAAAAB21lc3NhZ2UDCQEAAAABIQAAAAEFAAAABmlzSW5pdAkAAAIAAAABAgAAAA5kQXBwIG5vdCByZWFkeQMJAQAAAAlvd25lck9ubHkAAAABBQAAAAFpCQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACBQAAAA5kYXBwUnVubmluZ0tleQUAAAAGaXNMaXZlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAEW1haW50ZW5hbmNlTVNHS2V5BQAAAAdtZXNzYWdlBQAAAANuaWwJAAACAAAAAQIAAAAiWW91IGFyZSBub3QgYWxsb3dlZCB0byBjaGFuZ2UgdGhpcwAAAAFpAQAAAAtkZWxldGVFbnRyeQAAAAEAAAAFZW50cnkDCQEAAAAJb3duZXJPbmx5AAAAAQUAAAABaQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAVlbnRyeQUAAAADbmlsCQAAAgAAAAECAAAAAm5vAAAAAHoRwBw=", "height": 2177962, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CJn5khfJLxxh7qYCpVLEw1a1hxVan2BatSoJeCZGmHDv Next: F3CtFi1mVHhGXxrFsQoPhBYHNqhdtZBzewBAS9QFFAFC Diff:
Old | New | Differences | |
---|---|---|---|
150 | 150 | ||
151 | 151 | func getArtStatus (artId,addr) = { | |
152 | 152 | let status = getStringFromArtworksByKey(((("art_status_" + artId) + "_") + addr)) | |
153 | - | if (true) | |
154 | - | then throw(("status = " + status)) | |
155 | - | else status | |
153 | + | status | |
156 | 154 | } | |
157 | 155 | ||
158 | 156 | ||
164 | 162 | func isValidArt (status) = if (true) | |
165 | 163 | then throw(("status = " + status)) | |
166 | 164 | else if (if ((status != artFlagged)) | |
167 | - | then | |
168 | - | else | |
169 | - | then | |
170 | - | else | |
165 | + | then (status != artIllegal) | |
166 | + | else false) | |
167 | + | then (status != artPending) | |
168 | + | else false | |
171 | 169 | ||
172 | 170 | ||
173 | 171 | @Callable(i) | |
195 | 193 | else if (!(containsElement(NETWORKS, network))) | |
196 | 194 | then throw("Network not supported") | |
197 | 195 | else { | |
198 | - | let $ | |
199 | - | let id = $ | |
200 | - | let caller = $ | |
201 | - | let date = $ | |
202 | - | let $ | |
203 | - | let nft_payment = $ | |
204 | - | let nft_amount = $ | |
205 | - | let gateway_payment = $ | |
206 | - | let gateway_amount = $ | |
196 | + | let $t052155254 = idCallerDate(i) | |
197 | + | let id = $t052155254._1 | |
198 | + | let caller = $t052155254._2 | |
199 | + | let date = $t052155254._3 | |
200 | + | let $t052575334 = isPayment(i) | |
201 | + | let nft_payment = $t052575334._1 | |
202 | + | let nft_amount = $t052575334._2 | |
203 | + | let gateway_payment = $t052575334._3 | |
204 | + | let gateway_amount = $t052575334._4 | |
207 | 205 | if ((nft_amount != 1)) | |
208 | 206 | then throw("No NFT attached") | |
209 | 207 | else { | |
212 | 210 | else false) | |
213 | 211 | then toBase58String(value(nft_payment.assetId)) | |
214 | 212 | else throw("Only SIGN Art NFT accepted.") | |
215 | - | let $ | |
216 | - | let creator = $ | |
217 | - | let artId = $ | |
213 | + | let $t056435724 = getCreatorFromNFTid(nftId) | |
214 | + | let creator = $t056435724._1 | |
215 | + | let artId = $t056435724._2 | |
218 | 216 | if (!(isValidCreator(getCreatorStatus(creator)))) | |
219 | 217 | then throw(("Creator status is :" + getCreatorStatus(creator))) | |
220 | 218 | else if (true) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let CONF_INIT_K = "config_init" | |
5 | 5 | ||
6 | 6 | let CONF_AMIN_K = "config_admin" | |
7 | 7 | ||
8 | 8 | let CONF_ORACLE_K = "config_oracle" | |
9 | 9 | ||
10 | 10 | let CONF_ARTWORK_DAPP_K = "config_artwork_dapp" | |
11 | 11 | ||
12 | 12 | let CONF_USERS_DAPP_K = "config_users_dapp" | |
13 | 13 | ||
14 | 14 | let CONF_FEE_ASSET_K = "config_fee_asset" | |
15 | 15 | ||
16 | 16 | let CONF_FEE_AMOUNT_K = "config_fee_amount" | |
17 | 17 | ||
18 | 18 | let dappRunningKey = "conf_dapp_is_running" | |
19 | 19 | ||
20 | 20 | let maintenanceMSGKey = "conf_maintenance_msg" | |
21 | 21 | ||
22 | 22 | let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true) | |
23 | 23 | ||
24 | 24 | let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "") | |
25 | 25 | ||
26 | 26 | let status_LOCKED = "LOCKED" | |
27 | 27 | ||
28 | 28 | let status_UNLOCKED = "UNLOCKED" | |
29 | 29 | ||
30 | 30 | let status_PENDING = "PENDING" | |
31 | 31 | ||
32 | 32 | let status_CLOSED = "CLOSED" | |
33 | 33 | ||
34 | 34 | let creatorRegistered = "REGISTERED" | |
35 | 35 | ||
36 | 36 | let creatorVerified = "VERIFIED" | |
37 | 37 | ||
38 | 38 | let artFlagged = "FLAGGED" | |
39 | 39 | ||
40 | 40 | let artIllegal = "ILLEGAL" | |
41 | 41 | ||
42 | 42 | let artPending = "CHANGE_REQUIRED" | |
43 | 43 | ||
44 | 44 | let NETWORKS = ["ETH", "POLYGON"] | |
45 | 45 | ||
46 | 46 | func keyNFTstatus (nftId) = (("nft_" + nftId) + "_status") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyTransferNFT (nftId,txid) = ((("transfer_" + nftId) + "_") + txid) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | let keyFeeNonMinted = "cost_non_minted" | |
53 | 53 | ||
54 | 54 | let keyFeeMinted = "cost_minted" | |
55 | 55 | ||
56 | 56 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | let admin = value(addressFromString(getStringByKey(CONF_AMIN_K))) | |
66 | 66 | ||
67 | 67 | let artworksDapp = value(addressFromString(getStringByKey(CONF_ARTWORK_DAPP_K))) | |
68 | 68 | ||
69 | 69 | let usersDapp = value(addressFromString(getStringByKey(CONF_USERS_DAPP_K))) | |
70 | 70 | ||
71 | 71 | let oracleAddr = value(addressFromString(getStringByKey(CONF_ORACLE_K))) | |
72 | 72 | ||
73 | 73 | let feeAcceptedAsset = getStringByKey(CONF_FEE_ASSET_K) | |
74 | 74 | ||
75 | 75 | let feeAcceptedAmountForSign = getIntegerByKey(CONF_FEE_AMOUNT_K) | |
76 | 76 | ||
77 | 77 | func getStringFromUsersByKey (key) = valueOrElse(getString(usersDapp, key), "") | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getStringFromArtworksByKey (key) = valueOrElse(getString(artworksDapp, key), "") | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleAddr, key), "Integer undefine or 0 in oracle") | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1)) | |
87 | 87 | then (assetDetails.decimals == 0) | |
88 | 88 | else false) | |
89 | 89 | then (assetDetails.reissuable == false) | |
90 | 90 | else false) | |
91 | 91 | then (assetDetails.issuer == artworksDapp) | |
92 | 92 | else false | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func isSignArtNFT (id) = { | |
96 | 96 | let assetDetails = value(assetInfo(id)) | |
97 | 97 | assetIsValid(assetDetails) | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func isPayment (i) = if ((size(i.payments) == 0)) | |
102 | 102 | then throw("No payment attached") | |
103 | 103 | else { | |
104 | 104 | let nft_payment = value(i.payments[0]) | |
105 | 105 | let nft_amount = value(nft_payment.amount) | |
106 | 106 | let gateway_payment = value(i.payments[1]) | |
107 | 107 | let gateway_amount = value(gateway_payment.amount) | |
108 | 108 | $Tuple4(nft_payment, nft_amount, gateway_payment, gateway_amount) | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | let isInit = valueOrElse(getBooleanByKey(CONF_INIT_K), false) | |
113 | 113 | ||
114 | 114 | func ownerOnly (i) = { | |
115 | 115 | let caller = toString(i.caller) | |
116 | 116 | let id = toBase58String(i.transactionId) | |
117 | 117 | let allowedArr = if (isInit) | |
118 | 118 | then [toString(admin), toString(this)] | |
119 | 119 | else [toString(this)] | |
120 | 120 | if (containsElement(allowedArr, caller)) | |
121 | 121 | then true | |
122 | 122 | else false | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func idCallerDate (i) = if (!(dappRunning)) | |
127 | 127 | then throw(maintenanceMSG) | |
128 | 128 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getCreatorFromNFTid (nftid) = { | |
132 | 132 | let nftData = getStringFromArtworksByKey(("nft_" + nftid)) | |
133 | 133 | let creator = split(nftData, "_")[6] | |
134 | 134 | let artId = split(nftData, "_")[5] | |
135 | 135 | $Tuple2(creator, artId) | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func getCreatorERC20Addr (addr) = { | |
140 | 140 | let erc20Addr = getStringFromUsersByKey(("user_ERC20_" + addr)) | |
141 | 141 | erc20Addr | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getCreatorStatus (addr) = { | |
146 | 146 | let status = getStringFromUsersByKey(("user_status_" + addr)) | |
147 | 147 | status | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func getArtStatus (artId,addr) = { | |
152 | 152 | let status = getStringFromArtworksByKey(((("art_status_" + artId) + "_") + addr)) | |
153 | - | if (true) | |
154 | - | then throw(("status = " + status)) | |
155 | - | else status | |
153 | + | status | |
156 | 154 | } | |
157 | 155 | ||
158 | 156 | ||
159 | 157 | func isValidCreator (status) = if ((status == creatorRegistered)) | |
160 | 158 | then true | |
161 | 159 | else (status == creatorVerified) | |
162 | 160 | ||
163 | 161 | ||
164 | 162 | func isValidArt (status) = if (true) | |
165 | 163 | then throw(("status = " + status)) | |
166 | 164 | else if (if ((status != artFlagged)) | |
167 | - | then | |
168 | - | else | |
169 | - | then | |
170 | - | else | |
165 | + | then (status != artIllegal) | |
166 | + | else false) | |
167 | + | then (status != artPending) | |
168 | + | else false | |
171 | 169 | ||
172 | 170 | ||
173 | 171 | @Callable(i) | |
174 | 172 | func init (adminAddr,oracleAddr,artworksDapp,usersDapp) = if (ownerOnly(i)) | |
175 | 173 | then [StringEntry(CONF_AMIN_K, adminAddr), StringEntry(CONF_ORACLE_K, oracleAddr), StringEntry(CONF_ARTWORK_DAPP_K, artworksDapp), StringEntry(CONF_USERS_DAPP_K, usersDapp), BooleanEntry(CONF_INIT_K, true)] | |
176 | 174 | else throw("Not allowed") | |
177 | 175 | ||
178 | 176 | ||
179 | 177 | ||
180 | 178 | @Callable(i) | |
181 | 179 | func setFee (feeAsset,feeAmount) = { | |
182 | 180 | let assetDetails = assetInfo(fromBase58String(feeAsset)) | |
183 | 181 | let decimal = value(assetDetails).decimals | |
184 | 182 | let base10FeeAmount = pow(feeAmount, 0, 10, 1, decimal, HALFUP) | |
185 | 183 | if (ownerOnly(i)) | |
186 | 184 | then [StringEntry(CONF_FEE_ASSET_K, feeAsset), IntegerEntry(CONF_FEE_AMOUNT_K, base10FeeAmount)] | |
187 | 185 | else throw("Not allowed") | |
188 | 186 | } | |
189 | 187 | ||
190 | 188 | ||
191 | 189 | ||
192 | 190 | @Callable(i) | |
193 | 191 | func lock (recipient,network) = if (!(isInit)) | |
194 | 192 | then throw("dApp not ready") | |
195 | 193 | else if (!(containsElement(NETWORKS, network))) | |
196 | 194 | then throw("Network not supported") | |
197 | 195 | else { | |
198 | - | let $ | |
199 | - | let id = $ | |
200 | - | let caller = $ | |
201 | - | let date = $ | |
202 | - | let $ | |
203 | - | let nft_payment = $ | |
204 | - | let nft_amount = $ | |
205 | - | let gateway_payment = $ | |
206 | - | let gateway_amount = $ | |
196 | + | let $t052155254 = idCallerDate(i) | |
197 | + | let id = $t052155254._1 | |
198 | + | let caller = $t052155254._2 | |
199 | + | let date = $t052155254._3 | |
200 | + | let $t052575334 = isPayment(i) | |
201 | + | let nft_payment = $t052575334._1 | |
202 | + | let nft_amount = $t052575334._2 | |
203 | + | let gateway_payment = $t052575334._3 | |
204 | + | let gateway_amount = $t052575334._4 | |
207 | 205 | if ((nft_amount != 1)) | |
208 | 206 | then throw("No NFT attached") | |
209 | 207 | else { | |
210 | 208 | let nftId = if (if (isDefined(nft_payment.assetId)) | |
211 | 209 | then isSignArtNFT(value(nft_payment.assetId)) | |
212 | 210 | else false) | |
213 | 211 | then toBase58String(value(nft_payment.assetId)) | |
214 | 212 | else throw("Only SIGN Art NFT accepted.") | |
215 | - | let $ | |
216 | - | let creator = $ | |
217 | - | let artId = $ | |
213 | + | let $t056435724 = getCreatorFromNFTid(nftId) | |
214 | + | let creator = $t056435724._1 | |
215 | + | let artId = $t056435724._2 | |
218 | 216 | if (!(isValidCreator(getCreatorStatus(creator)))) | |
219 | 217 | then throw(("Creator status is :" + getCreatorStatus(creator))) | |
220 | 218 | else if (true) | |
221 | 219 | then throw(toString(isValidArt(getArtStatus(artId, creator)))) | |
222 | 220 | else if (!(isValidArt(getArtStatus(artId, creator)))) | |
223 | 221 | then throw(("Artwork status is :" + getArtStatus(artId, creator))) | |
224 | 222 | else { | |
225 | 223 | let erc20Addr = getCreatorERC20Addr(creator) | |
226 | 224 | if ((size(erc20Addr) == 0)) | |
227 | 225 | then throw("This artist didn't allow crosschain transfer") | |
228 | 226 | else { | |
229 | 227 | let nftStatus = getStringByKey(keyNFTstatus(nftId)) | |
230 | 228 | if (if ((nftStatus == status_LOCKED)) | |
231 | 229 | then true | |
232 | 230 | else (nftStatus == status_PENDING)) | |
233 | 231 | then throw("NFT already locked") | |
234 | 232 | else { | |
235 | 233 | let gasFeeNonMinted = getIntegerByKeyFromOracle(keyFeeNonMinted) | |
236 | 234 | let gasFeeMinted = getIntegerByKeyFromOracle(keyFeeMinted) | |
237 | 235 | let isMinted = if ((nftStatus == status_UNLOCKED)) | |
238 | 236 | then true | |
239 | 237 | else false | |
240 | 238 | if (if (!(isDefined(gateway_payment.assetId))) | |
241 | 239 | then true | |
242 | 240 | else (toBase58String(value(gateway_payment.assetId)) != feeAcceptedAsset)) | |
243 | 241 | then throw("Wrong payment asset") | |
244 | 242 | else if (if (isMinted) | |
245 | 243 | then (gateway_amount > (gasFeeMinted + feeAcceptedAmountForSign)) | |
246 | 244 | else false) | |
247 | 245 | then throw("Wrong payment amount to unlock") | |
248 | 246 | else if (if (!(isMinted)) | |
249 | 247 | then (gateway_amount > (gasFeeNonMinted + feeAcceptedAmountForSign)) | |
250 | 248 | else false) | |
251 | 249 | then throw("Wrong payment amount to mint and unlock") | |
252 | 250 | else [StringEntry(keyNFTstatus(nftId), status_PENDING), StringEntry(((keyTransferNFT(nftId, id) + "_") + status_PENDING), ((((((((((((recipient + "_") + network) + "_") + caller) + "_") + id) + "_") + value(assetInfo(value(nft_payment.assetId))).name) + "_") + toString(date)) + "_") + toString(height)))] | |
253 | 251 | } | |
254 | 252 | } | |
255 | 253 | } | |
256 | 254 | } | |
257 | 255 | } | |
258 | 256 | ||
259 | 257 | ||
260 | 258 | ||
261 | 259 | @Callable(i) | |
262 | 260 | func confirmLock (nftId,transferId) = if (!(isInit)) | |
263 | 261 | then throw("dApp not ready") | |
264 | 262 | else if (ownerOnly(i)) | |
265 | 263 | then { | |
266 | 264 | let nftStatus = getStringByKey(keyNFTstatus(nftId)) | |
267 | 265 | if ((nftStatus != status_PENDING)) | |
268 | 266 | then throw("NFT not pending") | |
269 | 267 | else { | |
270 | 268 | let val = getStringByKey(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING)) | |
271 | 269 | let newKey = ((keyTransferNFT(nftId, transferId) + "_") + status_CLOSED) | |
272 | 270 | [DeleteEntry(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING)), StringEntry(newKey, val), StringEntry(keyNFTstatus(nftId), status_LOCKED)] | |
273 | 271 | } | |
274 | 272 | } | |
275 | 273 | else throw("Not allowed") | |
276 | 274 | ||
277 | 275 | ||
278 | 276 | ||
279 | 277 | @Callable(i) | |
280 | 278 | func unlock (recipient,nftId) = if (!(isInit)) | |
281 | 279 | then throw("dApp not ready") | |
282 | 280 | else if (ownerOnly(i)) | |
283 | 281 | then { | |
284 | 282 | let nftStatus = getStringByKey(keyNFTstatus(nftId)) | |
285 | 283 | if ((nftStatus != status_LOCKED)) | |
286 | 284 | then throw("NFT not locked, finalize first if pending") | |
287 | 285 | else [StringEntry(keyNFTstatus(nftId), status_UNLOCKED), ScriptTransfer(Address(fromBase58String(recipient)), 1, fromBase58String(nftId))] | |
288 | 286 | } | |
289 | 287 | else throw("Not allowed") | |
290 | 288 | ||
291 | 289 | ||
292 | 290 | ||
293 | 291 | @Callable(i) | |
294 | 292 | func appRunning (isLive,message) = if (!(isInit)) | |
295 | 293 | then throw("dApp not ready") | |
296 | 294 | else if (ownerOnly(i)) | |
297 | 295 | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
298 | 296 | else throw("You are not allowed to change this") | |
299 | 297 | ||
300 | 298 | ||
301 | 299 | ||
302 | 300 | @Callable(i) | |
303 | 301 | func deleteEntry (entry) = if (ownerOnly(i)) | |
304 | 302 | then [DeleteEntry(entry)] | |
305 | 303 | else throw("no") | |
306 | 304 | ||
307 | 305 |
github/deemru/w8io/026f985 52.68 ms ◑