tx · 3GYqYRMKLCo5SY748DcX2z9xzB4MJzqTgfKk3ZNKDGwC

3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib:  -0.00800000 Waves

2022.08.04 14:54 [2169713] smart account 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib > SELF 0.00000000 Waves

{ "type": 13, "id": "3GYqYRMKLCo5SY748DcX2z9xzB4MJzqTgfKk3ZNKDGwC", "fee": 800000, "feeAssetId": null, "timestamp": 1659614044620, "version": 2, "chainId": 84, "sender": "3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib", "senderPublicKey": "3q3N8Kv49DbzNHyTB4A87UYz2DdquXCgP3GNCcD9Zj66", "proofs": [ "4QJQaK1wSka3wbxXFvkkLGXDNyy6PtocW4pKDEgxWdDvY7jUpPWWy9fsbLfc7JkpLfJEgg2WnGjAircXVG5jKdFP" ], "script": "base64:AAIFAAAAAAAAACgIAhIHCgUICAgICBIECgIICBIECgIICBIECgIICBIECgIECBIDCgEIAAAAJgAAAAALQ09ORl9JTklUX0sCAAAAC2NvbmZpZ19pbml0AAAAAAtDT05GX0FNSU5fSwIAAAAMY29uZmlnX2FkbWluAAAAAA1DT05GX09SQUNMRV9LAgAAAA1jb25maWdfb3JhY2xlAAAAABNDT05GX0FSVFdPUktfREFQUF9LAgAAABNjb25maWdfYXJ0d29ya19kYXBwAAAAABFDT05GX1VTRVJTX0RBUFBfSwIAAAARY29uZmlnX3VzZXJzX2RhcHAAAAAAEENPTkZfRkVFX0FTU0VUX0sCAAAAEGNvbmZpZ19mZWVfYXNzZXQAAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAAAtkYXBwUnVubmluZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAR0aGlzBQAAAA5kYXBwUnVubmluZ0tleQYAAAAAD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AAABBQAAAAZpc0luaXQJAAACAAAAAQIAAAAOZEFwcCBub3QgcmVhZHkDCQEAAAAJb3duZXJPbmx5AAAAAQUAAAABaQkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgUAAAAOZGFwcFJ1bm5pbmdLZXkFAAAABmlzTGl2ZQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAABFtYWludGVuYW5jZU1TR0tleQUAAAAHbWVzc2FnZQUAAAADbmlsCQAAAgAAAAECAAAAIllvdSBhcmUgbm90IGFsbG93ZWQgdG8gY2hhbmdlIHRoaXMAAAABaQEAAAALZGVsZXRlRW50cnkAAAABAAAABWVudHJ5AwkBAAAACW93bmVyT25seQAAAAEFAAAAAWkJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAFZW50cnkFAAAAA25pbAkAAAIAAAABAgAAAAJubwAAAAChrF6C", "height": 2169713, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HgjCP7Dp7dH5Wd6a8AVHzMdsVFqPfgUMtoYQjWgAWQPx Next: DxzYKeVJmXCkQCbafk4NMGdp9zYF4FMnUrNBFZ3GQXHQ Diff:
OldNewDifferences
173173 let isMinted = if ((nftStatus == status_UNLOCKED))
174174 then true
175175 else false
176- if ((toBase58String(value(gateway_payment.assetId)) != feeAcceptedAsset))
176+ if (if (!(isDefined(gateway_payment.assetId)))
177+ then true
178+ else (toBase58String(value(gateway_payment.assetId)) != feeAcceptedAsset))
177179 then throw("Wrong payment asset")
178180 else if (if (isMinted)
179181 then (gateway_amount > gasFeeMinted)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let CONF_INIT_K = "config_init"
55
66 let CONF_AMIN_K = "config_admin"
77
88 let CONF_ORACLE_K = "config_oracle"
99
1010 let CONF_ARTWORK_DAPP_K = "config_artwork_dapp"
1111
1212 let CONF_USERS_DAPP_K = "config_users_dapp"
1313
1414 let CONF_FEE_ASSET_K = "config_fee_asset"
1515
1616 let dappRunningKey = "conf_dapp_is_running"
1717
1818 let maintenanceMSGKey = "conf_maintenance_msg"
1919
2020 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
2121
2222 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
2323
2424 let status_LOCKED = "LOCKED"
2525
2626 let status_UNLOCKED = "UNLOCKED"
2727
2828 let status_PENDING = "PENDING"
2929
3030 let status_CLOSED = "CLOSED"
3131
3232 let NETWORKS = ["ETH", "POLYGON"]
3333
3434 func keyNFTstatus (nftId) = (("nft_" + nftId) + "_status")
3535
3636
3737 func keyTransferNFT (nftId,txid) = ((("transfer_" + nftId) + "_") + txid)
3838
3939
4040 let keyFeeNonMinted = "cost_non_minted"
4141
4242 let keyFeeMinted = "cost_minted"
4343
4444 func getStringByKey (key) = valueOrElse(getString(this, key), "")
4545
4646
4747 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
4848
4949
5050 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
5151
5252
5353 let admin = value(addressFromString(getStringByKey(CONF_AMIN_K)))
5454
5555 let artworksDapp = value(addressFromString(getStringByKey(CONF_ARTWORK_DAPP_K)))
5656
5757 let usersDapp = value(addressFromString(getStringByKey(CONF_USERS_DAPP_K)))
5858
5959 let oracleAddr = value(addressFromString(getStringByKey(CONF_ORACLE_K)))
6060
6161 let feeAcceptedAsset = getStringByKey(CONF_FEE_ASSET_K)
6262
6363 func getStringFromUsersByKey (key) = valueOrElse(getString(usersDapp, key), "")
6464
6565
6666 func getStringFromArtworksByKey (key) = valueOrElse(getString(artworksDapp, key), "")
6767
6868
6969 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleAddr, key), "Integer undefine or 0 in oracle")
7070
7171
7272 func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
7373 then (assetDetails.decimals == 0)
7474 else false)
7575 then (assetDetails.reissuable == false)
7676 else false)
7777 then (assetDetails.issuer == artworksDapp)
7878 else false
7979
8080
8181 func isSignArtNFT (id) = {
8282 let assetDetails = value(assetInfo(id))
8383 assetIsValid(assetDetails)
8484 }
8585
8686
8787 func isPayment (i) = if ((size(i.payments) == 0))
8888 then throw("No payment attached")
8989 else {
9090 let nft_payment = value(i.payments[0])
9191 let nft_amount = value(nft_payment.amount)
9292 let gateway_payment = value(i.payments[1])
9393 let gateway_amount = value(gateway_payment.amount)
9494 $Tuple4(nft_payment, nft_amount, gateway_payment, gateway_amount)
9595 }
9696
9797
9898 let isInit = valueOrElse(getBooleanByKey(CONF_INIT_K), false)
9999
100100 func ownerOnly (i) = {
101101 let caller = toString(i.caller)
102102 let id = toBase58String(i.transactionId)
103103 let allowedArr = if (isInit)
104104 then [toString(admin), toString(this)]
105105 else [toString(this)]
106106 if (containsElement(allowedArr, caller))
107107 then true
108108 else false
109109 }
110110
111111
112112 func idCallerDate (i) = if (!(dappRunning))
113113 then throw(maintenanceMSG)
114114 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
115115
116116
117117 func getCreatorFromNFTid (nftid) = {
118118 let nftData = getStringFromArtworksByKey(("nft_" + nftid))
119119 let creator = split(nftData, "_")[6]
120120 creator
121121 }
122122
123123
124124 func getCreatorERC20Addr (addr) = {
125125 let erc20Addr = getStringFromUsersByKey(("user_ERC20_" + addr))
126126 erc20Addr
127127 }
128128
129129
130130 @Callable(i)
131131 func init (adminAddr,oracleAddr,artworksDapp,usersDapp,feeAsset) = if (ownerOnly(i))
132132 then [StringEntry(CONF_AMIN_K, adminAddr), StringEntry(CONF_ORACLE_K, oracleAddr), StringEntry(CONF_ARTWORK_DAPP_K, artworksDapp), StringEntry(CONF_USERS_DAPP_K, usersDapp), StringEntry(CONF_FEE_ASSET_K, feeAsset), BooleanEntry(CONF_INIT_K, true)]
133133 else throw("Not allowed")
134134
135135
136136
137137 @Callable(i)
138138 func lock (recipient,network) = if (!(isInit))
139139 then throw("dApp not ready")
140140 else if (!(containsElement(NETWORKS, network)))
141141 then throw("Network not supported")
142142 else {
143143 let $t039784017 = idCallerDate(i)
144144 let id = $t039784017._1
145145 let caller = $t039784017._2
146146 let date = $t039784017._3
147147 let $t040204097 = isPayment(i)
148148 let nft_payment = $t040204097._1
149149 let nft_amount = $t040204097._2
150150 let gateway_payment = $t040204097._3
151151 let gateway_amount = $t040204097._4
152152 if ((nft_amount != 1))
153153 then throw("No NFT attached")
154154 else {
155155 let nftId = if (if (isDefined(nft_payment.assetId))
156156 then isSignArtNFT(value(nft_payment.assetId))
157157 else false)
158158 then toBase58String(value(nft_payment.assetId))
159159 else throw("Only SIGN Art NFT accepted.")
160160 let creatorFromNFTId = getCreatorFromNFTid(nftId)
161161 let erc20Addr = getCreatorERC20Addr(creatorFromNFTId)
162162 if ((size(erc20Addr) == 0))
163163 then throw("This artist didn't allow crosschain transfer")
164164 else {
165165 let nftStatus = getStringByKey(keyNFTstatus(nftId))
166166 if (if ((nftStatus == status_LOCKED))
167167 then true
168168 else (nftStatus == status_PENDING))
169169 then throw("NFT already locked")
170170 else {
171171 let gasFeeNonMinted = getIntegerByKeyFromOracle(keyFeeNonMinted)
172172 let gasFeeMinted = getIntegerByKeyFromOracle(keyFeeMinted)
173173 let isMinted = if ((nftStatus == status_UNLOCKED))
174174 then true
175175 else false
176- if ((toBase58String(value(gateway_payment.assetId)) != feeAcceptedAsset))
176+ if (if (!(isDefined(gateway_payment.assetId)))
177+ then true
178+ else (toBase58String(value(gateway_payment.assetId)) != feeAcceptedAsset))
177179 then throw("Wrong payment asset")
178180 else if (if (isMinted)
179181 then (gateway_amount > gasFeeMinted)
180182 else false)
181183 then throw("Wrong payment amount to unlock")
182184 else if (if (!(isMinted))
183185 then (gateway_amount > gasFeeNonMinted)
184186 else false)
185187 then throw("Wrong payment amount to mint and unlock")
186188 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)))]
187189 }
188190 }
189191 }
190192 }
191193
192194
193195
194196 @Callable(i)
195197 func confirmLock (nftId,transferId) = if (!(isInit))
196198 then throw("dApp not ready")
197199 else if (ownerOnly(i))
198200 then {
199201 let nftStatus = getStringByKey(keyNFTstatus(nftId))
200202 if ((nftStatus != status_PENDING))
201203 then throw("NFT not pending")
202204 else {
203205 let val = getStringByKey(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING))
204206 let newKey = ((keyTransferNFT(nftId, transferId) + "_") + status_CLOSED)
205207 [DeleteEntry(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING)), StringEntry(newKey, val), StringEntry(keyNFTstatus(nftId), status_LOCKED)]
206208 }
207209 }
208210 else throw("Not allowed")
209211
210212
211213
212214 @Callable(i)
213215 func unlock (recipient,nftId) = if (!(isInit))
214216 then throw("dApp not ready")
215217 else if (ownerOnly(i))
216218 then {
217219 let nftStatus = getStringByKey(keyNFTstatus(nftId))
218220 if ((nftStatus != status_LOCKED))
219221 then throw("NFT not locked, finalize first if pending")
220222 else [StringEntry(keyNFTstatus(nftId), status_UNLOCKED), ScriptTransfer(Address(fromBase58String(recipient)), 1, fromBase58String(nftId))]
221223 }
222224 else throw("Not allowed")
223225
224226
225227
226228 @Callable(i)
227229 func appRunning (isLive,message) = if (!(isInit))
228230 then throw("dApp not ready")
229231 else if (ownerOnly(i))
230232 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
231233 else throw("You are not allowed to change this")
232234
233235
234236
235237 @Callable(i)
236238 func deleteEntry (entry) = if (ownerOnly(i))
237239 then [DeleteEntry(entry)]
238240 else throw("no")
239241
240242

github/deemru/w8io/026f985 
36.20 ms