tx · AJ8u6LzVsNKamjW31VAMTKj8KXSfvzEcxd3ZtEfAMNyq 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib: -0.00800000 Waves 2022.08.10 06:31 [2177990] smart account 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib > SELF 0.00000000 Waves
{ "type": 13, "id": "AJ8u6LzVsNKamjW31VAMTKj8KXSfvzEcxd3ZtEfAMNyq", "fee": 800000, "feeAssetId": null, "timestamp": 1660113104113, "version": 2, "chainId": 84, "sender": "3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib", "senderPublicKey": "3q3N8Kv49DbzNHyTB4A87UYz2DdquXCgP3GNCcD9Zj66", "proofs": [ "2QWw6DV6gLA365ZzaHLu4YY4sFaC5AESNML8Jnc2xgUidaEpDaxqXUNDCc81aoCHoUimp3hthFqARPwHKe5QRHNJ" ], "script": "base64:BgIvCAISCAoGCAgICAgBEgQKAggBEgQKAggIEgQKAggIEgQKAggIEgQKAgQIEgMKAQgyAAd2ZXJzaW9uAgMxLjAAC0NPTkZfSU5JVF9LAgtjb25maWdfaW5pdAALQ09ORl9BTUlOX0sCDGNvbmZpZ19hZG1pbgANQ09ORl9PUkFDTEVfSwINY29uZmlnX29yYWNsZQATQ09ORl9BUlRXT1JLX0RBUFBfSwITY29uZmlnX2FydHdvcmtfZGFwcAARQ09ORl9VU0VSU19EQVBQX0sCEWNvbmZpZ191c2Vyc19kYXBwABBDT05GX0ZFRV9BU1NFVF9LAhBjb25maWdfZmVlX2Fzc2V0ABFDT05GX0ZFRV9BTU9VTlRfSwIRY29uZmlnX2ZlZV9hbW91bnQADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAtkYXBwUnVubmluZwkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzBQ5kYXBwUnVubmluZ0tleQYADm1haW50ZW5hbmNl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hdHVzAQUFbmZ0SWQDCQECIT0CBQluZnRTdGF0dXMFDXN0YXR1c19MT0NLRUQJAAIBAilORlQgbm90IGxvY2tlZCwgZmluYWxpemUgZmlyc3QgaWYgcGVuZGluZwkAzAgCCQELU3RyaW5nRW50cnkCCQEMa2V5TkZUc3RhdHVzAQUFbmZ0SWQFD3N0YXR1c19VTkxPQ0tFRAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUJcmVjaXBpZW50AAEJANkEAQUFbmZ0SWQFA25pbAkAAgECC05vdCBhbGxvd2VkAWkBCmFwcFJ1bm5pbmcCBmlzTGl2ZQdtZXNzYWdlAwkBASEBBQZpc0luaXQJAAIBAg5kQXBwIG5vdCByZWFkeQMJAQlvd25lck9ubHkBBQFpCQDMCAIJAQxCb29sZWFuRW50cnkCBQ5kYXBwUnVubmluZ0tleQUGaXNMaXZlCQDMCAIJAQtTdHJpbmdFbnRyeQIFEW1haW50ZW5hbmNlTVNHS2V5BQdtZXNzYWdlBQNuaWwJAAIBAiJZb3UgYXJlIG5vdCBhbGxvd2VkIHRvIGNoYW5nZSB0aGlzAWkBC2RlbGV0ZUVudHJ5AQVlbnRyeQMJAQlvd25lck9ubHkBBQFpCQDMCAIJAQtEZWxldGVFbnRyeQEFBWVudHJ5BQNuaWwJAAIBAgJubwB2hkVa", "height": 2177990, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6YaVbxpLSqPwhWiE4KsT1NeAREGiniRXsjQsB1Xcdspq Next: F7m79Gp3sp4KEaYRBtYVET62vDShyAVDQYMwW7ED1VVJ Diff:
Old | New | Differences | |
---|---|---|---|
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 $t053335372 = idCallerDate(i) | |
202 | + | let id = $t053335372._1 | |
203 | + | let caller = $t053335372._2 | |
204 | + | let date = $t053335372._3 | |
205 | + | let $t053755452 = isPayment(i) | |
206 | + | let nft_payment = $t053755452._1 | |
207 | + | let nft_amount = $t053755452._2 | |
208 | + | let gateway_payment = $t053755452._3 | |
209 | + | let gateway_amount = $t053755452._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 $t057395821 = getCreatorFromNFTid(nftId) | |
219 | + | let creator = $t057395821._1 | |
220 | + | let artId = $t057395821._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 | 46 | let NETWORKS = ["ETH", "POLYGON"] | |
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 $t053335372 = idCallerDate(i) | |
202 | + | let id = $t053335372._1 | |
203 | + | let caller = $t053335372._2 | |
204 | + | let date = $t053335372._3 | |
205 | + | let $t053755452 = isPayment(i) | |
206 | + | let nft_payment = $t053755452._1 | |
207 | + | let nft_amount = $t053755452._2 | |
208 | + | let gateway_payment = $t053755452._3 | |
209 | + | let gateway_amount = $t053755452._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 $t057395821 = getCreatorFromNFTid(nftId) | |
219 | + | let creator = $t057395821._1 | |
220 | + | let artId = $t057395821._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 141.07 ms ◑