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