tx · AjwQwJTjiekyzLPhfwEa3ttKafVNvTXtYGhR6YbGPCnZ

3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib:  -0.01400000 Waves

2022.08.01 12:39 [2165271] smart account 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib > SELF 0.00000000 Waves

{ "type": 13, "id": "AjwQwJTjiekyzLPhfwEa3ttKafVNvTXtYGhR6YbGPCnZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1659346763260, "version": 2, "chainId": 84, "sender": "3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib", "senderPublicKey": "3q3N8Kv49DbzNHyTB4A87UYz2DdquXCgP3GNCcD9Zj66", "proofs": [ "26GMaynSnQzJgtQ9ePxCBRYLUqgnUbpNQjq74mz93kb1UaPSTjT5kNCdPRvMMHgkWVuoURiZePkKZEjc5RWmXT4V" ], "script": "base64:AAIFAAAAAAAAACcIAhIGCgQICAgIEgQKAggIEgQKAggIEgQKAggIEgQKAgQIEgMKAQgAAAAiAAAAAAtDT05GX0lOSVRfSwIAAAALY29uZmlnX2luaXQAAAAAC0NPTkZfQU1JTl9LAgAAAAxjb25maWdfYWRtaW4AAAAADUNPTkZfT1JBQ0xFX0sCAAAADWNvbmZpZ19vcmFjbGUAAAAAE0NPTkZfQVJUV09SS19EQVBQX0sCAAAAE2NvbmZpZ19hcnR3b3JrX2RhcHAAAAAAEUNPTkZfVVNFUlNfREFQUF9LAgAAABFjb25maWdfdXNlcnNfZGFwcAAAAAAOZGFwcFJ1bm5pbmdLZXkCAAAAFGNvbmZfZGFwcF9pc19ydW5uaW5nAAAAABFtYWludGVuYW5jZU1TR0tleQIAAAAUY29uZl9tYWludGVuYW5jZV9tc2cAAAAAC2RhcHBSdW5uaW5nCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAABHRoaXMFAAAADmRhcHBSdW5uaW5nS2V5BgAAAAAObWFpbnRlbmFuY2VNU0cJAQAAAAt2YWx1ZU9yRWxzZQ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gAAAAECAAAADmRBcHAgbm90IHJlYWR5AwkBAAAACW93bmVyT25seQAAAAEFAAAAAWkJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAADmRhcHBSdW5uaW5nS2V5BQAAAAZpc0xpdmUJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAARbWFpbnRlbmFuY2VNU0dLZXkFAAAAB21lc3NhZ2UFAAAAA25pbAkAAAIAAAABAgAAACJZb3UgYXJlIG5vdCBhbGxvd2VkIHRvIGNoYW5nZSB0aGlzAAAAAWkBAAAAC2RlbGV0ZUVudHJ5AAAAAQAAAAVlbnRyeQMJAQAAAAlvd25lck9ubHkAAAABBQAAAAFpCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAABWVudHJ5BQAAAANuaWwJAAACAAAAAQIAAAACbm8AAAAA8Z+1CA==", "height": 2165271, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ixG6d9UGskiuQ1u46FyJUaGuV9VhRL1wwxWqKr5cgzz Next: AZQHVKJyenZnuxRGZ4FgLYddpod7S1kqqEZV6uZh9Eiy Diff:
OldNewDifferences
114114
115115
116116 func getCreatorERC20Addr (addr) = {
117- let nftData = getStringFromUsersByKey(("user_ERC20_" + addr))
118- let erc20Addr = split(nftData, "_")[6]
117+ let erc20Addr = getStringFromUsersByKey(("user_ERC20_" + addr))
119118 erc20Addr
120119 }
121120
133132 else if (!(containsElement(NETWORKS, network)))
134133 then throw("Network not supported")
135134 else {
136- let $t037783817 = idCallerDate(i)
137- let id = $t037783817._1
138- let caller = $t037783817._2
139- let date = $t037783817._3
140- let $t038203897 = isPayment(i)
141- let nft_payment = $t038203897._1
142- let nft_amount = $t038203897._2
143- let gateway_payment = $t038203897._3
144- let gateway_amount = $t038203897._4
135+ let $t037403779 = idCallerDate(i)
136+ let id = $t037403779._1
137+ let caller = $t037403779._2
138+ let date = $t037403779._3
139+ let $t037823859 = isPayment(i)
140+ let nft_payment = $t037823859._1
141+ let nft_amount = $t037823859._2
142+ let gateway_payment = $t037823859._3
143+ let gateway_amount = $t037823859._4
145144 if ((nft_amount != 1))
146145 then throw("No NFT attached")
147146 else {
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 dappRunningKey = "conf_dapp_is_running"
1515
1616 let maintenanceMSGKey = "conf_maintenance_msg"
1717
1818 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
1919
2020 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
2121
2222 let status_LOCKED = "LOCKED"
2323
2424 let status_UNLOCKED = "UNLOCKED"
2525
2626 let status_PENDING = "PENDING"
2727
2828 let status_CLOSED = "CLOSED"
2929
3030 let NETWORKS = ["ETH", "POLYGON"]
3131
3232 func keyNFTstatus (nftId) = (("nft_" + nftId) + "_status")
3333
3434
3535 func keyTransferNFT (nftId,txid) = ((("transfer_" + nftId) + "_") + txid)
3636
3737
3838 func getStringByKey (key) = valueOrElse(getString(this, key), "")
3939
4040
4141 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
4242
4343
4444 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
4545
4646
4747 let admin = value(addressFromString(getStringByKey(CONF_AMIN_K)))
4848
4949 let artworksDapp = value(addressFromString(getStringByKey(CONF_ARTWORK_DAPP_K)))
5050
5151 let usersDapp = value(addressFromString(getStringByKey(CONF_USERS_DAPP_K)))
5252
5353 let oracleAddr = value(addressFromString(getStringByKey(CONF_ORACLE_K)))
5454
5555 func getStringFromUsersByKey (key) = valueOrElse(getString(usersDapp, key), "")
5656
5757
5858 func getStringFromArtworksByKey (key) = valueOrElse(getString(artworksDapp, key), "")
5959
6060
6161 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleAddr, key), "Integer undefine or 0 in oracle")
6262
6363
6464 func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1))
6565 then (assetDetails.decimals == 0)
6666 else false)
6767 then (assetDetails.reissuable == false)
6868 else false)
6969 then (assetDetails.issuer == artworksDapp)
7070 else false
7171
7272
7373 func isSignArtNFT (id) = {
7474 let assetDetails = value(assetInfo(id))
7575 assetIsValid(assetDetails)
7676 }
7777
7878
7979 func isPayment (i) = if ((size(i.payments) == 0))
8080 then throw("No payment attached")
8181 else {
8282 let nft_payment = value(i.payments[0])
8383 let nft_amount = value(nft_payment.amount)
8484 let gateway_payment = value(i.payments[1])
8585 let gateway_amount = value(gateway_payment.amount)
8686 $Tuple4(nft_payment, nft_amount, gateway_payment, gateway_amount)
8787 }
8888
8989
9090 let isInit = valueOrElse(getBooleanByKey(CONF_INIT_K), false)
9191
9292 func ownerOnly (i) = {
9393 let caller = toString(i.caller)
9494 let id = toBase58String(i.transactionId)
9595 let allowedArr = if (isInit)
9696 then [toString(admin), toString(this)]
9797 else [toString(this)]
9898 if (containsElement(allowedArr, caller))
9999 then true
100100 else false
101101 }
102102
103103
104104 func idCallerDate (i) = if (!(dappRunning))
105105 then throw(maintenanceMSG)
106106 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
107107
108108
109109 func getCreatorFromNFTid (nftid) = {
110110 let nftData = getStringFromArtworksByKey(("nft_" + nftid))
111111 let creator = split(nftData, "_")[6]
112112 creator
113113 }
114114
115115
116116 func getCreatorERC20Addr (addr) = {
117- let nftData = getStringFromUsersByKey(("user_ERC20_" + addr))
118- let erc20Addr = split(nftData, "_")[6]
117+ let erc20Addr = getStringFromUsersByKey(("user_ERC20_" + addr))
119118 erc20Addr
120119 }
121120
122121
123122 @Callable(i)
124123 func init (adminAddr,oracleAddr,artworksDapp,usersDapp) = if (ownerOnly(i))
125124 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)]
126125 else throw("Not allowed")
127126
128127
129128
130129 @Callable(i)
131130 func lock (recipient,network) = if (!(isInit))
132131 then throw("dApp not ready")
133132 else if (!(containsElement(NETWORKS, network)))
134133 then throw("Network not supported")
135134 else {
136- let $t037783817 = idCallerDate(i)
137- let id = $t037783817._1
138- let caller = $t037783817._2
139- let date = $t037783817._3
140- let $t038203897 = isPayment(i)
141- let nft_payment = $t038203897._1
142- let nft_amount = $t038203897._2
143- let gateway_payment = $t038203897._3
144- let gateway_amount = $t038203897._4
135+ let $t037403779 = idCallerDate(i)
136+ let id = $t037403779._1
137+ let caller = $t037403779._2
138+ let date = $t037403779._3
139+ let $t037823859 = isPayment(i)
140+ let nft_payment = $t037823859._1
141+ let nft_amount = $t037823859._2
142+ let gateway_payment = $t037823859._3
143+ let gateway_amount = $t037823859._4
145144 if ((nft_amount != 1))
146145 then throw("No NFT attached")
147146 else {
148147 let nftId = if (if (isDefined(nft_payment.assetId))
149148 then isSignArtNFT(value(nft_payment.assetId))
150149 else false)
151150 then toBase58String(value(nft_payment.assetId))
152151 else throw("Only SIGN Art NFT accepted.")
153152 let creatorFromNFTId = getCreatorFromNFTid(nftId)
154153 let erc20Addr = getCreatorERC20Addr(creatorFromNFTId)
155154 if (true)
156155 then throw(("erc20Addr = " + erc20Addr))
157156 else if ((size(erc20Addr) == 0))
158157 then throw("This artist didn't allow crosschain transfer")
159158 else {
160159 let nftStatus = getStringByKey(keyNFTstatus(nftId))
161160 if (if ((nftStatus == status_LOCKED))
162161 then true
163162 else (nftStatus == status_PENDING))
164163 then throw("NFT already locked")
165164 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)))]
166165 }
167166 }
168167 }
169168
170169
171170
172171 @Callable(i)
173172 func confirmLock (nftId,transferId) = if (!(isInit))
174173 then throw("dApp not ready")
175174 else if (ownerOnly(i))
176175 then {
177176 let nftStatus = getStringByKey(keyNFTstatus(nftId))
178177 if ((nftStatus != status_PENDING))
179178 then throw("NFT not pending")
180179 else {
181180 let val = getStringByKey(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING))
182181 let newKey = ((keyTransferNFT(nftId, transferId) + "_") + status_CLOSED)
183182 [DeleteEntry(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING)), StringEntry(newKey, val), StringEntry(keyNFTstatus(nftId), status_LOCKED)]
184183 }
185184 }
186185 else throw("Not allowed")
187186
188187
189188
190189 @Callable(i)
191190 func unlock (recipient,nftId) = if (!(isInit))
192191 then throw("dApp not ready")
193192 else if (ownerOnly(i))
194193 then {
195194 let nftStatus = getStringByKey(keyNFTstatus(nftId))
196195 if ((nftStatus != status_LOCKED))
197196 then throw("NFT not locked, finalize first if pending")
198197 else [StringEntry(keyNFTstatus(nftId), status_UNLOCKED), ScriptTransfer(Address(fromBase58String(recipient)), 1, fromBase58String(nftId))]
199198 }
200199 else throw("Not allowed")
201200
202201
203202
204203 @Callable(i)
205204 func appRunning (isLive,message) = if (!(isInit))
206205 then throw("dApp not ready")
207206 else if (ownerOnly(i))
208207 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
209208 else throw("You are not allowed to change this")
210209
211210
212211
213212 @Callable(i)
214213 func deleteEntry (entry) = if (ownerOnly(i))
215214 then [DeleteEntry(entry)]
216215 else throw("no")
217216
218217

github/deemru/w8io/026f985 
36.32 ms