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:BgIvCAISCAoGCAgICAgBEgQKAggBEgQKAggIEgQKAggIEgQKAggIEgQKAgQIEgMKAQgyAAd2ZXJzaW9uAgMxLjAAC0NPTkZfSU5JVF9LAgtjb25maWdfaW5pdAALQ09ORl9BTUlOX0sCDGNvbmZpZ19hZG1pbgANQ09ORl9PUkFDTEVfSwINY29uZmlnX29yYWNsZQATQ09ORl9BUlRXT1JLX0RBUFBfSwITY29uZmlnX2FydHdvcmtfZGFwcAARQ09ORl9VU0VSU19EQVBQX0sCEWNvbmZpZ191c2Vyc19kYXBwABBDT05GX0ZFRV9BU1NFVF9LAhBjb25maWdfZmVlX2Fzc2V0ABFDT05GX0ZFRV9BTU9VTlRfSwIRY29uZmlnX2ZlZV9hbW91bnQADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAtkYXBwUnVubmluZwkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzBQ5kYXBwUnVubmluZ0tleQYADm1haW50ZW5hbmN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RhdHVzAQUFbmZ0SWQDCQECIT0CBQluZnRTdGF0dXMFDXN0YXR1c19MT0NLRUQJAAIBAilORlQgbm90IGxvY2tlZCwgZmluYWxpemUgZmlyc3QgaWYgcGVuZGluZwkAzAgCCQELU3RyaW5nRW50cnkCCQEMa2V5TkZUc3RhdHVzAQUFbmZ0SWQFD3N0YXR1c19VTkxPQ0tFRAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUJcmVjaXBpZW50AAEJANkEAQUFbmZ0SWQFA25pbAkAAgECC05vdCBhbGxvd2VkAWkBCmFwcFJ1bm5pbmcCBmlzTGl2ZQdtZXNzYWdlAwkBASEBBQZpc0luaXQJAAIBAg5kQXBwIG5vdCByZWFkeQMJAQlvd25lck9ubHkBBQFpCQDMCAIJAQxCb29sZWFuRW50cnkCBQ5kYXBwUnVubmluZ0tleQUGaXNMaXZlCQDMCAIJAQtTdHJpbmdFbnRyeQIFEW1haW50ZW5hbmNlTVNHS2V5BQdtZXNzYWdlBQNuaWwJAAIBAiJZb3UgYXJlIG5vdCBhbGxvd2VkIHRvIGNoYW5nZSB0aGlzAWkBC2RlbGV0ZUVudHJ5AQVlbnRyeQMJAQlvd25lck9ubHkBBQFpCQDMCAIJAQtEZWxldGVFbnRyeQEFBWVudHJ5BQNuaWwJAAIBAgJubwB2hkVa", "height": 2177990, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6YaVbxpLSqPwhWiE4KsT1NeAREGiniRXsjQsB1Xcdspq Next: F7m79Gp3sp4KEaYRBtYVET62vDShyAVDQYMwW7ED1VVJ Diff:
OldNewDifferences
198198 else if (!(containsElement(NETWORKS, network)))
199199 then throw("Network not supported")
200200 else {
201- let $t052865325 = idCallerDate(i)
202- let id = $t052865325._1
203- let caller = $t052865325._2
204- let date = $t052865325._3
205- let $t053285405 = isPayment(i)
206- let nft_payment = $t053285405._1
207- let nft_amount = $t053285405._2
208- let gateway_payment = $t053285405._3
209- let gateway_amount = $t053285405._4
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
210210 if ((nft_amount != 1))
211211 then throw("No NFT attached")
212212 else {
215215 else false)
216216 then toBase58String(value(nft_payment.assetId))
217217 else throw("Only SIGN Art NFT accepted.")
218- let $t056925774 = getCreatorFromNFTid(nftId)
219- let creator = $t056925774._1
220- let artId = $t056925774._2
218+ let $t057395821 = getCreatorFromNFTid(nftId)
219+ let creator = $t057395821._1
220+ let artId = $t057395821._2
221221 if (!(isValidCreator(getCreatorStatus(creator))))
222222 then throw(("Creator status is :" + getCreatorStatus(creator)))
223223 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 dappRunningKey = "conf_dapp_is_running"
2121
2222 let maintenanceMSGKey = "conf_maintenance_msg"
2323
2424 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
2525
2626 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
2727
2828 let status_LOCKED = "LOCKED"
2929
3030 let status_UNLOCKED = "UNLOCKED"
3131
3232 let status_PENDING = "PENDING"
3333
3434 let status_CLOSED = "CLOSED"
3535
3636 let creatorRegistered = "REGISTERED"
3737
3838 let creatorVerified = "VERIFIED"
3939
4040 let artFlagged = "FLAGGED"
4141
4242 let artIllegal = "ILLEGAL"
4343
4444 let artPending = "CHANGE_REQUIRED"
4545
4646 let NETWORKS = ["ETH", "POLYGON"]
4747
4848 func keyNFTstatus (nftId) = (("nft_" + nftId) + "_status")
4949
5050
5151 func keyTransferNFT (nftId,txid) = ((("transfer_" + nftId) + "_") + txid)
5252
5353
5454 let keyFeeNonMinted = "cost_non_minted"
5555
5656 let keyFeeMinted = "cost_minted"
5757
5858 func getStringByKey (key) = valueOrElse(getString(this, key), "")
5959
6060
6161 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
6262
6363
6464 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
6565
6666
6767 let admin = value(addressFromString(getStringByKey(CONF_AMIN_K)))
6868
6969 let artworksDapp = value(addressFromString(getStringByKey(CONF_ARTWORK_DAPP_K)))
7070
7171 let usersDapp = value(addressFromString(getStringByKey(CONF_USERS_DAPP_K)))
7272
7373 let oracleAddr = value(addressFromString(getStringByKey(CONF_ORACLE_K)))
7474
7575 let feeAcceptedAsset = getStringByKey(CONF_FEE_ASSET_K)
7676
7777 let feeAcceptedAmountForSign = getIntegerByKey(CONF_FEE_AMOUNT_K)
7878
7979 func getStringFromUsersByKey (key) = valueOrElse(getString(usersDapp, key), "")
8080
8181
8282 func getStringFromArtworksByKey (key) = valueOrElse(getString(artworksDapp, key), "")
8383
8484
8585 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleAddr, key), "Integer undefine or 0 in oracle")
8686
8787
8888 func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
8989 then (assetDetails.decimals == 0)
9090 else false)
9191 then (assetDetails.reissuable == false)
9292 else false)
9393 then (assetDetails.issuer == artworksDapp)
9494 else false
9595
9696
9797 func isSignArtNFT (id) = {
9898 let assetDetails = value(assetInfo(id))
9999 assetIsValid(assetDetails)
100100 }
101101
102102
103103 func isPayment (i) = if ((size(i.payments) == 0))
104104 then throw("No payment attached")
105105 else {
106106 let nft_payment = value(i.payments[0])
107107 let nft_amount = value(nft_payment.amount)
108108 let gateway_payment = value(i.payments[1])
109109 let gateway_amount = value(gateway_payment.amount)
110110 $Tuple4(nft_payment, nft_amount, gateway_payment, gateway_amount)
111111 }
112112
113113
114114 let isInit = valueOrElse(getBooleanByKey(CONF_INIT_K), false)
115115
116116 func ownerOnly (i) = {
117117 let caller = toString(i.caller)
118118 let id = toBase58String(i.transactionId)
119119 let allowedArr = if (isInit)
120120 then [toString(admin), toString(this)]
121121 else [toString(this)]
122122 if (containsElement(allowedArr, caller))
123123 then true
124124 else false
125125 }
126126
127127
128128 func idCallerDate (i) = if (!(dappRunning))
129129 then throw(maintenanceMSG)
130130 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
131131
132132
133133 func getCreatorFromNFTid (nftid) = {
134134 let nftData = getStringFromArtworksByKey(("nft_" + nftid))
135135 let creator = split(nftData, "_")[6]
136136 let artId = split(nftData, "_")[5]
137137 $Tuple2(creator, artId)
138138 }
139139
140140
141141 func getCreatorERC20Addr (addr) = {
142142 let erc20Addr = getStringFromUsersByKey(("user_ERC20_" + addr))
143143 erc20Addr
144144 }
145145
146146
147147 func getCreatorStatus (addr) = {
148148 let status = getStringFromUsersByKey(("user_status_" + addr))
149149 status
150150 }
151151
152152
153153 func getArtStatus (artId,addr) = {
154154 let status = getStringFromArtworksByKey(((("art_flag_" + artId) + "_") + addr))
155155 status
156156 }
157157
158158
159159 func isValidCreator (status) = if ((status == creatorRegistered))
160160 then true
161161 else (status == creatorVerified)
162162
163163
164164 func isValidArt (status) = if (if ((status != artFlagged))
165165 then (status != artIllegal)
166166 else false)
167167 then (status != artPending)
168168 else false
169169
170170
171171 @Callable(i)
172172 func init (adminAddr,oracleAddr,artworksDapp,usersDapp,feeAsset,feeAmount) = if (ownerOnly(i))
173173 then {
174174 let initFee = invoke(this, "setFee", [feeAsset, feeAmount], nil)
175175 if ((initFee == initFee))
176176 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)]
177177 else throw("Strict value is not equal to itself.")
178178 }
179179 else throw("Not allowed")
180180
181181
182182
183183 @Callable(i)
184184 func setFee (feeAsset,feeAmount) = {
185185 let assetDetails = assetInfo(fromBase58String(feeAsset))
186186 let decimal = value(assetDetails).decimals
187187 let base10FeeAmount = pow(feeAmount, 0, 10, 1, decimal, HALFUP)
188188 if (ownerOnly(i))
189189 then [StringEntry(CONF_FEE_ASSET_K, feeAsset), IntegerEntry(CONF_FEE_AMOUNT_K, base10FeeAmount)]
190190 else throw("Not allowed")
191191 }
192192
193193
194194
195195 @Callable(i)
196196 func lock (recipient,network) = if (!(isInit))
197197 then throw("dApp not ready")
198198 else if (!(containsElement(NETWORKS, network)))
199199 then throw("Network not supported")
200200 else {
201- let $t052865325 = idCallerDate(i)
202- let id = $t052865325._1
203- let caller = $t052865325._2
204- let date = $t052865325._3
205- let $t053285405 = isPayment(i)
206- let nft_payment = $t053285405._1
207- let nft_amount = $t053285405._2
208- let gateway_payment = $t053285405._3
209- let gateway_amount = $t053285405._4
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
210210 if ((nft_amount != 1))
211211 then throw("No NFT attached")
212212 else {
213213 let nftId = if (if (isDefined(nft_payment.assetId))
214214 then isSignArtNFT(value(nft_payment.assetId))
215215 else false)
216216 then toBase58String(value(nft_payment.assetId))
217217 else throw("Only SIGN Art NFT accepted.")
218- let $t056925774 = getCreatorFromNFTid(nftId)
219- let creator = $t056925774._1
220- let artId = $t056925774._2
218+ let $t057395821 = getCreatorFromNFTid(nftId)
219+ let creator = $t057395821._1
220+ let artId = $t057395821._2
221221 if (!(isValidCreator(getCreatorStatus(creator))))
222222 then throw(("Creator status is :" + getCreatorStatus(creator)))
223223 else if (!(isValidArt(getArtStatus(artId, creator))))
224224 then throw(("Artwork status is :" + getArtStatus(artId, creator)))
225225 else {
226226 let erc20Addr = getCreatorERC20Addr(creator)
227227 if ((size(erc20Addr) == 0))
228228 then throw("This artist didn't allow crosschain transfer")
229229 else {
230230 let nftStatus = getStringByKey(keyNFTstatus(nftId))
231231 if (if ((nftStatus == status_LOCKED))
232232 then true
233233 else (nftStatus == status_PENDING))
234234 then throw("NFT already locked")
235235 else {
236236 let gasFeeNonMinted = getIntegerByKeyFromOracle(keyFeeNonMinted)
237237 let gasFeeMinted = getIntegerByKeyFromOracle(keyFeeMinted)
238238 let isMinted = if ((nftStatus == status_UNLOCKED))
239239 then true
240240 else false
241241 if (if (!(isDefined(gateway_payment.assetId)))
242242 then true
243243 else (toBase58String(value(gateway_payment.assetId)) != feeAcceptedAsset))
244244 then throw("Wrong payment asset")
245245 else if (if (isMinted)
246246 then (gateway_amount > (gasFeeMinted + feeAcceptedAmountForSign))
247247 else false)
248248 then throw("Wrong payment amount to unlock")
249249 else if (if (!(isMinted))
250250 then (gateway_amount > (gasFeeNonMinted + feeAcceptedAmountForSign))
251251 else false)
252252 then throw("Wrong payment amount to mint and unlock")
253253 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)))]
254254 }
255255 }
256256 }
257257 }
258258 }
259259
260260
261261
262262 @Callable(i)
263263 func confirmLock (nftId,transferId) = if (!(isInit))
264264 then throw("dApp not ready")
265265 else if (ownerOnly(i))
266266 then {
267267 let nftStatus = getStringByKey(keyNFTstatus(nftId))
268268 if ((nftStatus != status_PENDING))
269269 then throw("NFT not pending")
270270 else {
271271 let val = getStringByKey(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING))
272272 let newKey = ((keyTransferNFT(nftId, transferId) + "_") + status_CLOSED)
273273 [DeleteEntry(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING)), StringEntry(newKey, val), StringEntry(keyNFTstatus(nftId), status_LOCKED)]
274274 }
275275 }
276276 else throw("Not allowed")
277277
278278
279279
280280 @Callable(i)
281281 func unlock (recipient,nftId) = if (!(isInit))
282282 then throw("dApp not ready")
283283 else if (ownerOnly(i))
284284 then {
285285 let nftStatus = getStringByKey(keyNFTstatus(nftId))
286286 if ((nftStatus != status_LOCKED))
287287 then throw("NFT not locked, finalize first if pending")
288288 else [StringEntry(keyNFTstatus(nftId), status_UNLOCKED), ScriptTransfer(Address(fromBase58String(recipient)), 1, fromBase58String(nftId))]
289289 }
290290 else throw("Not allowed")
291291
292292
293293
294294 @Callable(i)
295295 func appRunning (isLive,message) = if (!(isInit))
296296 then throw("dApp not ready")
297297 else if (ownerOnly(i))
298298 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
299299 else throw("You are not allowed to change this")
300300
301301
302302
303303 @Callable(i)
304304 func deleteEntry (entry) = if (ownerOnly(i))
305305 then [DeleteEntry(entry)]
306306 else throw("no")
307307
308308

github/deemru/w8io/169f3d6 
141.07 ms