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