tx · 3gH8THxNKMtCmgJBNM3bAJx5Prwo7vgz4QETMUymaVRt

3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib:  -0.00900000 Waves

2022.08.15 12:36 [2185406] smart account 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib > SELF 0.00000000 Waves

{ "type": 13, "id": "3gH8THxNKMtCmgJBNM3bAJx5Prwo7vgz4QETMUymaVRt", "fee": 900000, "feeAssetId": null, "timestamp": 1660556182538, "version": 2, "chainId": 84, "sender": "3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib", "senderPublicKey": "3q3N8Kv49DbzNHyTB4A87UYz2DdquXCgP3GNCcD9Zj66", "proofs": [ "5y9vBmjDaBXhRCSUALVMqu17aF7iJo6LMmYHdjSZodHcGVG8ken1TDKh75MFnASjWasbG1jo5VbEhUe5r7hh1Q6j" ], "script": "base64:BgI3CAISCgoICAgICAgBCAgSBAoCCAgSBAoCCAESBAoCCAgSBAoCCAgSBAoCCAgSBAoCBAgSAwoBCDQAB3ZlcnNpb24CAzEuMAALQ09ORl9JTklUX0sCC2NvbmZpZ19pbml0AAtDT05GX0FNSU5fSwIMY29uZmlnX2FkbWluAA1DT05GX09SQUNMRV9LAg1jb25maWdfb3JhY2xlABNDT05GX0FSVFdPUktfREFQUF9LAhNjb25maWdfYXJ0d29ya19kYXBwABFDT05GX1VTRVJTX0RBUFBfSwIRY29uZmlnX3VzZXJzX2RhcHAAEENPTkZfRkVFX0FTU0VUX0sCEGNvbmZpZ19mZWVfYXNzZXQAEUNPTkZfRkVFX0FNT1VOVF9LAhFjb25maWdfZmVlX2Ftb3VudAAVQ09ORl9TV09QX1NJR05fREFQUF9LAhVjb25maWdfc3dvcF9zaWduX2RhcHAAFENPTkZfU1dPUF9FVEhfREFQUF9LAhRjb25maWdfc3dvcF9ldGhfZGFwcAAOZGFwcFJ1bm5pbmdLZXkCFGNvbmZfZGFwcF9pc19ydW5uaW5nABFtYWludGVuYW5jZU1TR0tleQIUY29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jVbSya2EBhmbUdEViuMW8iLamSY6dW9776EYv Next: G1MuvMVT8JoFXfs9GkhPY4W3sJBigK4g5BBKtTxa7iLC Diff:
OldNewDifferences
1919
2020 let CONF_SWOP_SIGN_DAPP_K = "config_swop_sign_dapp"
2121
22-let CONF_SWOP_ETH_DAPP_K = "config_swop_sign_dapp"
22+let CONF_SWOP_ETH_DAPP_K = "config_swop_eth_dapp"
2323
2424 let dappRunningKey = "conf_dapp_is_running"
2525
214214 else if (!(containsElement(NETWORKS, network)))
215215 then throw("Network not supported")
216216 else {
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
217+ let $t058255864 = idCallerDate(i)
218+ let id = $t058255864._1
219+ let caller = $t058255864._2
220+ let date = $t058255864._3
221+ let $t058675944 = isPayment(i)
222+ let nft_payment = $t058675944._1
223+ let nft_amount = $t058675944._2
224+ let gateway_payment = $t058675944._3
225+ let gateway_amount = $t058675944._4
226226 if ((nft_amount != 1))
227227 then throw("No NFT attached")
228228 else {
231231 else false)
232232 then toBase58String(value(nft_payment.assetId))
233233 else throw("Only SIGN Art NFT accepted.")
234- let $t062326314 = getCreatorFromNFTid(nftId)
235- let creator = $t062326314._1
236- let artId = $t062326314._2
234+ let $t062316313 = getCreatorFromNFTid(nftId)
235+ let creator = $t062316313._1
236+ let artId = $t062316313._2
237237 if (!(isValidCreator(getCreatorStatus(creator))))
238238 then throw(("Creator status is :" + getCreatorStatus(creator)))
239239 else if (!(isValidArt(getArtStatus(artId, creator))))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let version = "1.0"
55
66 let CONF_INIT_K = "config_init"
77
88 let CONF_AMIN_K = "config_admin"
99
1010 let CONF_ORACLE_K = "config_oracle"
1111
1212 let CONF_ARTWORK_DAPP_K = "config_artwork_dapp"
1313
1414 let CONF_USERS_DAPP_K = "config_users_dapp"
1515
1616 let CONF_FEE_ASSET_K = "config_fee_asset"
1717
1818 let CONF_FEE_AMOUNT_K = "config_fee_amount"
1919
2020 let CONF_SWOP_SIGN_DAPP_K = "config_swop_sign_dapp"
2121
22-let CONF_SWOP_ETH_DAPP_K = "config_swop_sign_dapp"
22+let CONF_SWOP_ETH_DAPP_K = "config_swop_eth_dapp"
2323
2424 let dappRunningKey = "conf_dapp_is_running"
2525
2626 let maintenanceMSGKey = "conf_maintenance_msg"
2727
2828 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
2929
3030 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
3131
3232 let status_LOCKED = "LOCKED"
3333
3434 let status_UNLOCKED = "UNLOCKED"
3535
3636 let status_PENDING = "PENDING"
3737
3838 let status_CLOSED = "CLOSED"
3939
4040 let creatorRegistered = "REGISTERED"
4141
4242 let creatorVerified = "VERIFIED"
4343
4444 let artFlagged = "FLAGGED"
4545
4646 let artIllegal = "ILLEGAL"
4747
4848 let artPending = "CHANGE_REQUIRED"
4949
5050 let NETWORKS = ["ETH"]
5151
5252 func keyNFTstatus (nftId) = (("nft_" + nftId) + "_status")
5353
5454
5555 func keyTransferNFT (nftId,txid) = ((("transfer_" + nftId) + "_") + txid)
5656
5757
5858 let keyFeeNonMinted = "cost_non_minted"
5959
6060 let keyFeeMinted = "cost_minted"
6161
6262 func getStringByKey (key) = valueOrElse(getString(this, key), "")
6363
6464
6565 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
6666
6767
6868 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
6969
7070
7171 let admin = value(addressFromString(getStringByKey(CONF_AMIN_K)))
7272
7373 let artworksDapp = value(addressFromString(getStringByKey(CONF_ARTWORK_DAPP_K)))
7474
7575 let usersDapp = value(addressFromString(getStringByKey(CONF_USERS_DAPP_K)))
7676
7777 let oracleAddr = value(addressFromString(getStringByKey(CONF_ORACLE_K)))
7878
7979 let feeAcceptedAsset = getStringByKey(CONF_FEE_ASSET_K)
8080
8181 let feeAcceptedAmountForSign = getIntegerByKey(CONF_FEE_AMOUNT_K)
8282
8383 func getStringFromUsersByKey (key) = valueOrElse(getString(usersDapp, key), "")
8484
8585
8686 func getStringFromArtworksByKey (key) = valueOrElse(getString(artworksDapp, key), "")
8787
8888
8989 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleAddr, key), "Integer undefine or 0 in oracle")
9090
9191
9292 func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
9393 then (assetDetails.decimals == 0)
9494 else false)
9595 then (assetDetails.reissuable == false)
9696 else false)
9797 then (assetDetails.issuer == artworksDapp)
9898 else false
9999
100100
101101 func isSignArtNFT (id) = {
102102 let assetDetails = value(assetInfo(id))
103103 assetIsValid(assetDetails)
104104 }
105105
106106
107107 func isPayment (i) = if ((size(i.payments) == 0))
108108 then throw("No payment attached")
109109 else {
110110 let nft_payment = value(i.payments[0])
111111 let nft_amount = value(nft_payment.amount)
112112 let gateway_payment = value(i.payments[1])
113113 let gateway_amount = value(gateway_payment.amount)
114114 $Tuple4(nft_payment, nft_amount, gateway_payment, gateway_amount)
115115 }
116116
117117
118118 let isInit = valueOrElse(getBooleanByKey(CONF_INIT_K), false)
119119
120120 func ownerOnly (i) = {
121121 let caller = toString(i.caller)
122122 let id = toBase58String(i.transactionId)
123123 let allowedArr = if (isInit)
124124 then [toString(admin), toString(this)]
125125 else [toString(this)]
126126 if (containsElement(allowedArr, caller))
127127 then true
128128 else false
129129 }
130130
131131
132132 func idCallerDate (i) = if (!(dappRunning))
133133 then throw(maintenanceMSG)
134134 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
135135
136136
137137 func getCreatorFromNFTid (nftid) = {
138138 let nftData = getStringFromArtworksByKey(("nft_" + nftid))
139139 let creator = split(nftData, "_")[6]
140140 let artId = split(nftData, "_")[5]
141141 $Tuple2(creator, artId)
142142 }
143143
144144
145145 func getCreatorERC20Addr (addr) = {
146146 let erc20Addr = getStringFromUsersByKey(("user_ERC20_" + addr))
147147 erc20Addr
148148 }
149149
150150
151151 func getCreatorStatus (addr) = {
152152 let status = getStringFromUsersByKey(("user_status_" + addr))
153153 status
154154 }
155155
156156
157157 func getArtStatus (artId,addr) = {
158158 let status = getStringFromArtworksByKey(((("art_flag_" + artId) + "_") + addr))
159159 status
160160 }
161161
162162
163163 func isValidCreator (status) = if ((status == creatorRegistered))
164164 then true
165165 else (status == creatorVerified)
166166
167167
168168 func isValidArt (status) = if (if ((status != artFlagged))
169169 then (status != artIllegal)
170170 else false)
171171 then (status != artPending)
172172 else false
173173
174174
175175 @Callable(i)
176176 func init (adminAddr,oracleAddr,artworksDapp,usersDapp,feeAsset,feeAmount,signDapp,ethDapp) = if (ownerOnly(i))
177177 then {
178178 let initFee = invoke(this, "setFee", [feeAsset, feeAmount], nil)
179179 if ((initFee == initFee))
180180 then {
181181 let setSwopDapps = invoke(this, "setSwopDapps", [signDapp, ethDapp], nil)
182182 if ((setSwopDapps == setSwopDapps))
183183 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)]
184184 else throw("Strict value is not equal to itself.")
185185 }
186186 else throw("Strict value is not equal to itself.")
187187 }
188188 else throw("Not allowed")
189189
190190
191191
192192 @Callable(i)
193193 func setSwopDapps (signDapp,ethDapp) = if (ownerOnly(i))
194194 then [StringEntry(CONF_SWOP_SIGN_DAPP_K, signDapp), StringEntry(CONF_SWOP_ETH_DAPP_K, ethDapp)]
195195 else throw("Not allowed")
196196
197197
198198
199199 @Callable(i)
200200 func setFee (feeAsset,feeAmount) = {
201201 let assetDetails = assetInfo(fromBase58String(feeAsset))
202202 let decimal = value(assetDetails).decimals
203203 let base10FeeAmount = pow(feeAmount, 0, 10, 1, decimal, HALFUP)
204204 if (ownerOnly(i))
205205 then [StringEntry(CONF_FEE_ASSET_K, feeAsset), IntegerEntry(CONF_FEE_AMOUNT_K, base10FeeAmount)]
206206 else throw("Not allowed")
207207 }
208208
209209
210210
211211 @Callable(i)
212212 func lock (recipient,network) = if (!(isInit))
213213 then throw("dApp not ready")
214214 else if (!(containsElement(NETWORKS, network)))
215215 then throw("Network not supported")
216216 else {
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
217+ let $t058255864 = idCallerDate(i)
218+ let id = $t058255864._1
219+ let caller = $t058255864._2
220+ let date = $t058255864._3
221+ let $t058675944 = isPayment(i)
222+ let nft_payment = $t058675944._1
223+ let nft_amount = $t058675944._2
224+ let gateway_payment = $t058675944._3
225+ let gateway_amount = $t058675944._4
226226 if ((nft_amount != 1))
227227 then throw("No NFT attached")
228228 else {
229229 let nftId = if (if (isDefined(nft_payment.assetId))
230230 then isSignArtNFT(value(nft_payment.assetId))
231231 else false)
232232 then toBase58String(value(nft_payment.assetId))
233233 else throw("Only SIGN Art NFT accepted.")
234- let $t062326314 = getCreatorFromNFTid(nftId)
235- let creator = $t062326314._1
236- let artId = $t062326314._2
234+ let $t062316313 = getCreatorFromNFTid(nftId)
235+ let creator = $t062316313._1
236+ let artId = $t062316313._2
237237 if (!(isValidCreator(getCreatorStatus(creator))))
238238 then throw(("Creator status is :" + getCreatorStatus(creator)))
239239 else if (!(isValidArt(getArtStatus(artId, creator))))
240240 then throw(("Artwork status is :" + getArtStatus(artId, creator)))
241241 else {
242242 let erc20Addr = getCreatorERC20Addr(creator)
243243 if ((size(erc20Addr) == 0))
244244 then throw("This artist didn't allow crosschain transfer")
245245 else {
246246 let nftStatus = getStringByKey(keyNFTstatus(nftId))
247247 if (if ((nftStatus == status_LOCKED))
248248 then true
249249 else (nftStatus == status_PENDING))
250250 then throw("NFT already locked")
251251 else {
252252 let gasFeeNonMinted = getIntegerByKeyFromOracle(keyFeeNonMinted)
253253 let gasFeeMinted = getIntegerByKeyFromOracle(keyFeeMinted)
254254 let isMinted = if ((nftStatus == status_UNLOCKED))
255255 then true
256256 else false
257257 if (if (!(isDefined(gateway_payment.assetId)))
258258 then true
259259 else (toBase58String(value(gateway_payment.assetId)) != feeAcceptedAsset))
260260 then throw("Wrong payment asset")
261261 else if (if (isMinted)
262262 then (gateway_amount > (gasFeeMinted + feeAcceptedAmountForSign))
263263 else false)
264264 then throw("Wrong payment amount to unlock")
265265 else if (if (!(isMinted))
266266 then (gateway_amount > (gasFeeNonMinted + feeAcceptedAmountForSign))
267267 else false)
268268 then throw("Wrong payment amount to mint and unlock")
269269 else {
270270 let usdnToSwapForEth = if (isMinted)
271271 then gasFeeMinted
272272 else gasFeeNonMinted
273273 let swap_usdn_to_sign = invoke(addressFromStringValue(getStringByKey(CONF_SWOP_SIGN_DAPP_K)), "exchange", [1], [AttachedPayment(fromBase58String(feeAcceptedAsset), feeAcceptedAmountForSign)])
274274 if ((swap_usdn_to_sign == swap_usdn_to_sign))
275275 then {
276276 let swap_usdn_to_eth = invoke(addressFromStringValue(getStringByKey(CONF_SWOP_ETH_DAPP_K)), "exchange", [1], [AttachedPayment(fromBase58String(feeAcceptedAsset), usdnToSwapForEth)])
277277 if ((swap_usdn_to_eth == swap_usdn_to_eth))
278278 then [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)))]
279279 else throw("Strict value is not equal to itself.")
280280 }
281281 else throw("Strict value is not equal to itself.")
282282 }
283283 }
284284 }
285285 }
286286 }
287287 }
288288
289289
290290
291291 @Callable(i)
292292 func confirmLock (nftId,transferId) = if (!(isInit))
293293 then throw("dApp not ready")
294294 else if (ownerOnly(i))
295295 then {
296296 let nftStatus = getStringByKey(keyNFTstatus(nftId))
297297 if ((nftStatus != status_PENDING))
298298 then throw("NFT not pending")
299299 else {
300300 let val = getStringByKey(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING))
301301 let newKey = ((keyTransferNFT(nftId, transferId) + "_") + status_CLOSED)
302302 [DeleteEntry(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING)), StringEntry(newKey, val), StringEntry(keyNFTstatus(nftId), status_LOCKED)]
303303 }
304304 }
305305 else throw("Not allowed")
306306
307307
308308
309309 @Callable(i)
310310 func unlock (recipient,nftId) = if (!(isInit))
311311 then throw("dApp not ready")
312312 else if (ownerOnly(i))
313313 then {
314314 let nftStatus = getStringByKey(keyNFTstatus(nftId))
315315 if ((nftStatus != status_LOCKED))
316316 then throw("NFT not locked, finalize first if pending")
317317 else [StringEntry(keyNFTstatus(nftId), status_UNLOCKED), ScriptTransfer(Address(fromBase58String(recipient)), 1, fromBase58String(nftId))]
318318 }
319319 else throw("Not allowed")
320320
321321
322322
323323 @Callable(i)
324324 func appRunning (isLive,message) = if (!(isInit))
325325 then throw("dApp not ready")
326326 else if (ownerOnly(i))
327327 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
328328 else throw("You are not allowed to change this")
329329
330330
331331
332332 @Callable(i)
333333 func deleteEntry (entry) = if (ownerOnly(i))
334334 then [DeleteEntry(entry)]
335335 else throw("no")
336336
337337

github/deemru/w8io/026f985 
59.93 ms