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:BgIvCAISCAoGCAgICAgBEgQKAggBEgQKAggIEgQKAggIEgQKAggIEgQKAgQIEgMKAQgyAAd2ZXJzaW9uAgMxLjAAC0NPTkZfSU5JVF9LAgtjb25maWdfaW5pdAALQ09ORl9BTUlOX0sCDGNvbmZpZ19hZG1pbgANQ09ORl9PUkFDTEVfSwINY29uZmlnX29yYWNsZQATQ09ORl9BUlRXT1JLX0RBUFBfSwITY29uZmlnX2FydHdvcmtfZGFwcAARQ09ORl9VU0VSU19EQVBQX0sCEWNvbmZpZ191c2Vyc19kYXBwABBDT05GX0ZFRV9BU1NFVF9LAhBjb25maWdfZmVlX2Fzc2V0ABFDT05GX0ZFRV9BTU9VTlRfSwIRY29uZmlnX2ZlZV9hbW91bnQADmRhcHBSdW5uaW5nS2V5AhRjb25mX2RhcHBfaXNfcnVubmluZwARbWFpbnRlbmFuY2VNU0dLZXkCFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAtkYXBwUnVubmluZwkBC3ZhbHVlT3JFbHNlAgkAmwgCBQR0aGlzBQ5kYXBwUnVubmluZ0tleQYADm1haW50ZW5hbmNlTVNH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ACAQIpTkZUIG5vdCBsb2NrZWQsIGZpbmFsaXplIGZpcnN0IGlmIHBlbmRpbmcJAMwIAgkBC1N0cmluZ0VudHJ5AgkBDGtleU5GVHN0YXR1cwEFBW5mdElkBQ9zdGF0dXNfVU5MT0NLRUQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFCXJlY2lwaWVudAABCQDZBAEFBW5mdElkBQNuaWwJAAIBAgtOb3QgYWxsb3dlZAFpAQphcHBSdW5uaW5nAgZpc0xpdmUHbWVzc2FnZQMJAQEhAQUGaXNJbml0CQACAQIOZEFwcCBub3QgcmVhZHkDCQEJb3duZXJPbmx5AQUBaQkAzAgCCQEMQm9vbGVhbkVudHJ5AgUOZGFwcFJ1bm5pbmdLZXkFBmlzTGl2ZQkAzAgCCQELU3RyaW5nRW50cnkCBRFtYWludGVuYW5jZU1TR0tleQUHbWVzc2FnZQUDbmlsCQACAQIiWW91IGFyZSBub3QgYWxsb3dlZCB0byBjaGFuZ2UgdGhpcwFpAQtkZWxldGVFbnRyeQEFZW50cnkDCQEJb3duZXJPbmx5AQUBaQkAzAgCCQELRGVsZXRlRW50cnkBBQVlbnRyeQUDbmlsCQACAQICbm8ArfddXQ==", "height": 2178123, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AJ8u6LzVsNKamjW31VAMTKj8KXSfvzEcxd3ZtEfAMNyq Next: GBcz3SgfT4hWwhZcNNdnLCWWzfupndmHv67ss6vx4jfQ Diff:
OldNewDifferences
4343
4444 let artPending = "CHANGE_REQUIRED"
4545
46-let NETWORKS = ["ETH", "POLYGON"]
46+let NETWORKS = ["ETH"]
4747
4848 func keyNFTstatus (nftId) = (("nft_" + nftId) + "_status")
4949
198198 else if (!(containsElement(NETWORKS, network)))
199199 then throw("Network not supported")
200200 else {
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
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
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 $t057395821 = getCreatorFromNFTid(nftId)
219- let creator = $t057395821._1
220- let artId = $t057395821._2
218+ let $t057525834 = getCreatorFromNFTid(nftId)
219+ let creator = $t057525834._1
220+ let artId = $t057525834._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
46-let NETWORKS = ["ETH", "POLYGON"]
46+let NETWORKS = ["ETH"]
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 $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
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
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 $t057395821 = getCreatorFromNFTid(nftId)
219- let creator = $t057395821._1
220- let artId = $t057395821._2
218+ let $t057525834 = getCreatorFromNFTid(nftId)
219+ let creator = $t057525834._1
220+ let artId = $t057525834._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 
53.45 ms