tx · DxzYKeVJmXCkQCbafk4NMGdp9zYF4FMnUrNBFZ3GQXHQ 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib: -0.00900000 Waves 2022.08.10 07:56 [2177900] smart account 3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib > SELF 0.00000000 Waves
{ "type": 13, "id": "DxzYKeVJmXCkQCbafk4NMGdp9zYF4FMnUrNBFZ3GQXHQ", "fee": 900000, "feeAssetId": null, "timestamp": 1660107429371, "version": 2, "chainId": 84, "sender": "3NBwZbvD45CscLGF78qTaDRBZ7mDBHt3Yib", "senderPublicKey": "3q3N8Kv49DbzNHyTB4A87UYz2DdquXCgP3GNCcD9Zj66", "proofs": [ "2fn2hgwFkkahNCKDkkE3BFshEvXSb78kWzZAWWD9ipi1tS6Qmm1xj6dt6CktxK2SGnEVFhN2N1XtptqPUAY6M6u3" ], "script": "base64:AAIFAAAAAAAAAC0IAhIGCgQICAgIEgQKAggBEgQKAggIEgQKAggIEgQKAggIEgQKAgQIEgMKAQgAAAAnAAAAAAtDT05GX0lOSVRfSwIAAAALY29uZmlnX2luaXQAAAAAC0NPTkZfQU1JTl9LAgAAAAxjb25maWdfYWRtaW4AAAAADUNPTkZfT1JBQ0xFX0sCAAAADWNvbmZpZ19vcmFjbGUAAAAAE0NPTkZfQVJUV09SS19EQVBQX0sCAAAAE2NvbmZpZ19hcnR3b3JrX2RhcHAAAAAAEUNPTkZfVVNFUlNfREFQUF9LAgAAABFjb25maWdfdXNlcnNfZGFwcAAAAAAQQ09ORl9GRUVfQVNTRVRfSwIAAAAQY29uZmlnX2ZlZV9hc3NldAAAAAARQ09ORl9GRUVfQU1PVU5UX0sCAAAAEWNvbmZpZ19mZWVfYW1vdW50AAAAAA5kYXBwUnVubmluZ0tleQIAAAAUY29uZl9kYXBwX2lzX3J1bm5pbmcAAAAAEW1haW50ZW5hbmNlTVNHS2V5AgAAABRjb25mX21haW50ZW5hbmNlX21zZwAAAAALZGFwcFJ1bm5pbmc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exity": 0 } View: original | compacted Prev: 3GYqYRMKLCo5SY748DcX2z9xzB4MJzqTgfKk3ZNKDGwC Next: a7ZiuokMsqt4fkEypEM66ff7HoLfBXpczvTQSvtiuSv Diff:
Old | New | Differences | |
---|---|---|---|
12 | 12 | let CONF_USERS_DAPP_K = "config_users_dapp" | |
13 | 13 | ||
14 | 14 | let CONF_FEE_ASSET_K = "config_fee_asset" | |
15 | + | ||
16 | + | let CONF_FEE_AMOUNT_K = "config_fee_amount" | |
15 | 17 | ||
16 | 18 | let dappRunningKey = "conf_dapp_is_running" | |
17 | 19 | ||
128 | 130 | ||
129 | 131 | ||
130 | 132 | @Callable(i) | |
131 | - | func init (adminAddr,oracleAddr,artworksDapp,usersDapp | |
132 | - | then [StringEntry(CONF_AMIN_K, adminAddr), StringEntry(CONF_ORACLE_K, oracleAddr), StringEntry(CONF_ARTWORK_DAPP_K, artworksDapp), StringEntry(CONF_USERS_DAPP_K, usersDapp), | |
133 | + | func init (adminAddr,oracleAddr,artworksDapp,usersDapp) = if (ownerOnly(i)) | |
134 | + | 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)] | |
133 | 135 | else throw("Not allowed") | |
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | @Callable(i) | |
140 | + | func setFee (feeAsset,feeAmount) = { | |
141 | + | let assetDetails = assetInfo(fromBase58String(feeAsset)) | |
142 | + | let decimal = value(assetDetails).decimals | |
143 | + | let base10FeeAmount = pow(feeAmount, 0, 10, 1, decimal, HALFUP) | |
144 | + | if (ownerOnly(i)) | |
145 | + | then [StringEntry(CONF_FEE_ASSET_K, feeAsset), IntegerEntry(CONF_FEE_AMOUNT_K, base10FeeAmount)] | |
146 | + | else throw("Not allowed") | |
147 | + | } | |
134 | 148 | ||
135 | 149 | ||
136 | 150 | ||
140 | 154 | else if (!(containsElement(NETWORKS, network))) | |
141 | 155 | then throw("Network not supported") | |
142 | 156 | else { | |
143 | - | let $ | |
144 | - | let id = $ | |
145 | - | let caller = $ | |
146 | - | let date = $ | |
147 | - | let $ | |
148 | - | let nft_payment = $ | |
149 | - | let nft_amount = $ | |
150 | - | let gateway_payment = $ | |
151 | - | let gateway_amount = $ | |
157 | + | let $t043604399 = idCallerDate(i) | |
158 | + | let id = $t043604399._1 | |
159 | + | let caller = $t043604399._2 | |
160 | + | let date = $t043604399._3 | |
161 | + | let $t044024479 = isPayment(i) | |
162 | + | let nft_payment = $t044024479._1 | |
163 | + | let nft_amount = $t044024479._2 | |
164 | + | let gateway_payment = $t044024479._3 | |
165 | + | let gateway_amount = $t044024479._4 | |
152 | 166 | if ((nft_amount != 1)) | |
153 | 167 | then throw("No NFT attached") | |
154 | 168 | else { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let CONF_INIT_K = "config_init" | |
5 | 5 | ||
6 | 6 | let CONF_AMIN_K = "config_admin" | |
7 | 7 | ||
8 | 8 | let CONF_ORACLE_K = "config_oracle" | |
9 | 9 | ||
10 | 10 | let CONF_ARTWORK_DAPP_K = "config_artwork_dapp" | |
11 | 11 | ||
12 | 12 | let CONF_USERS_DAPP_K = "config_users_dapp" | |
13 | 13 | ||
14 | 14 | let CONF_FEE_ASSET_K = "config_fee_asset" | |
15 | + | ||
16 | + | let CONF_FEE_AMOUNT_K = "config_fee_amount" | |
15 | 17 | ||
16 | 18 | let dappRunningKey = "conf_dapp_is_running" | |
17 | 19 | ||
18 | 20 | let maintenanceMSGKey = "conf_maintenance_msg" | |
19 | 21 | ||
20 | 22 | let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true) | |
21 | 23 | ||
22 | 24 | let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "") | |
23 | 25 | ||
24 | 26 | let status_LOCKED = "LOCKED" | |
25 | 27 | ||
26 | 28 | let status_UNLOCKED = "UNLOCKED" | |
27 | 29 | ||
28 | 30 | let status_PENDING = "PENDING" | |
29 | 31 | ||
30 | 32 | let status_CLOSED = "CLOSED" | |
31 | 33 | ||
32 | 34 | let NETWORKS = ["ETH", "POLYGON"] | |
33 | 35 | ||
34 | 36 | func keyNFTstatus (nftId) = (("nft_" + nftId) + "_status") | |
35 | 37 | ||
36 | 38 | ||
37 | 39 | func keyTransferNFT (nftId,txid) = ((("transfer_" + nftId) + "_") + txid) | |
38 | 40 | ||
39 | 41 | ||
40 | 42 | let keyFeeNonMinted = "cost_non_minted" | |
41 | 43 | ||
42 | 44 | let keyFeeMinted = "cost_minted" | |
43 | 45 | ||
44 | 46 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
45 | 47 | ||
46 | 48 | ||
47 | 49 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
48 | 50 | ||
49 | 51 | ||
50 | 52 | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
51 | 53 | ||
52 | 54 | ||
53 | 55 | let admin = value(addressFromString(getStringByKey(CONF_AMIN_K))) | |
54 | 56 | ||
55 | 57 | let artworksDapp = value(addressFromString(getStringByKey(CONF_ARTWORK_DAPP_K))) | |
56 | 58 | ||
57 | 59 | let usersDapp = value(addressFromString(getStringByKey(CONF_USERS_DAPP_K))) | |
58 | 60 | ||
59 | 61 | let oracleAddr = value(addressFromString(getStringByKey(CONF_ORACLE_K))) | |
60 | 62 | ||
61 | 63 | let feeAcceptedAsset = getStringByKey(CONF_FEE_ASSET_K) | |
62 | 64 | ||
63 | 65 | func getStringFromUsersByKey (key) = valueOrElse(getString(usersDapp, key), "") | |
64 | 66 | ||
65 | 67 | ||
66 | 68 | func getStringFromArtworksByKey (key) = valueOrElse(getString(artworksDapp, key), "") | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleAddr, key), "Integer undefine or 0 in oracle") | |
70 | 72 | ||
71 | 73 | ||
72 | 74 | func assetIsValid (assetDetails) = if (if (if ((assetDetails.quantity == 1)) | |
73 | 75 | then (assetDetails.decimals == 0) | |
74 | 76 | else false) | |
75 | 77 | then (assetDetails.reissuable == false) | |
76 | 78 | else false) | |
77 | 79 | then (assetDetails.issuer == artworksDapp) | |
78 | 80 | else false | |
79 | 81 | ||
80 | 82 | ||
81 | 83 | func isSignArtNFT (id) = { | |
82 | 84 | let assetDetails = value(assetInfo(id)) | |
83 | 85 | assetIsValid(assetDetails) | |
84 | 86 | } | |
85 | 87 | ||
86 | 88 | ||
87 | 89 | func isPayment (i) = if ((size(i.payments) == 0)) | |
88 | 90 | then throw("No payment attached") | |
89 | 91 | else { | |
90 | 92 | let nft_payment = value(i.payments[0]) | |
91 | 93 | let nft_amount = value(nft_payment.amount) | |
92 | 94 | let gateway_payment = value(i.payments[1]) | |
93 | 95 | let gateway_amount = value(gateway_payment.amount) | |
94 | 96 | $Tuple4(nft_payment, nft_amount, gateway_payment, gateway_amount) | |
95 | 97 | } | |
96 | 98 | ||
97 | 99 | ||
98 | 100 | let isInit = valueOrElse(getBooleanByKey(CONF_INIT_K), false) | |
99 | 101 | ||
100 | 102 | func ownerOnly (i) = { | |
101 | 103 | let caller = toString(i.caller) | |
102 | 104 | let id = toBase58String(i.transactionId) | |
103 | 105 | let allowedArr = if (isInit) | |
104 | 106 | then [toString(admin), toString(this)] | |
105 | 107 | else [toString(this)] | |
106 | 108 | if (containsElement(allowedArr, caller)) | |
107 | 109 | then true | |
108 | 110 | else false | |
109 | 111 | } | |
110 | 112 | ||
111 | 113 | ||
112 | 114 | func idCallerDate (i) = if (!(dappRunning)) | |
113 | 115 | then throw(maintenanceMSG) | |
114 | 116 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
115 | 117 | ||
116 | 118 | ||
117 | 119 | func getCreatorFromNFTid (nftid) = { | |
118 | 120 | let nftData = getStringFromArtworksByKey(("nft_" + nftid)) | |
119 | 121 | let creator = split(nftData, "_")[6] | |
120 | 122 | creator | |
121 | 123 | } | |
122 | 124 | ||
123 | 125 | ||
124 | 126 | func getCreatorERC20Addr (addr) = { | |
125 | 127 | let erc20Addr = getStringFromUsersByKey(("user_ERC20_" + addr)) | |
126 | 128 | erc20Addr | |
127 | 129 | } | |
128 | 130 | ||
129 | 131 | ||
130 | 132 | @Callable(i) | |
131 | - | func init (adminAddr,oracleAddr,artworksDapp,usersDapp | |
132 | - | then [StringEntry(CONF_AMIN_K, adminAddr), StringEntry(CONF_ORACLE_K, oracleAddr), StringEntry(CONF_ARTWORK_DAPP_K, artworksDapp), StringEntry(CONF_USERS_DAPP_K, usersDapp), | |
133 | + | func init (adminAddr,oracleAddr,artworksDapp,usersDapp) = if (ownerOnly(i)) | |
134 | + | 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)] | |
133 | 135 | else throw("Not allowed") | |
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | @Callable(i) | |
140 | + | func setFee (feeAsset,feeAmount) = { | |
141 | + | let assetDetails = assetInfo(fromBase58String(feeAsset)) | |
142 | + | let decimal = value(assetDetails).decimals | |
143 | + | let base10FeeAmount = pow(feeAmount, 0, 10, 1, decimal, HALFUP) | |
144 | + | if (ownerOnly(i)) | |
145 | + | then [StringEntry(CONF_FEE_ASSET_K, feeAsset), IntegerEntry(CONF_FEE_AMOUNT_K, base10FeeAmount)] | |
146 | + | else throw("Not allowed") | |
147 | + | } | |
134 | 148 | ||
135 | 149 | ||
136 | 150 | ||
137 | 151 | @Callable(i) | |
138 | 152 | func lock (recipient,network) = if (!(isInit)) | |
139 | 153 | then throw("dApp not ready") | |
140 | 154 | else if (!(containsElement(NETWORKS, network))) | |
141 | 155 | then throw("Network not supported") | |
142 | 156 | else { | |
143 | - | let $ | |
144 | - | let id = $ | |
145 | - | let caller = $ | |
146 | - | let date = $ | |
147 | - | let $ | |
148 | - | let nft_payment = $ | |
149 | - | let nft_amount = $ | |
150 | - | let gateway_payment = $ | |
151 | - | let gateway_amount = $ | |
157 | + | let $t043604399 = idCallerDate(i) | |
158 | + | let id = $t043604399._1 | |
159 | + | let caller = $t043604399._2 | |
160 | + | let date = $t043604399._3 | |
161 | + | let $t044024479 = isPayment(i) | |
162 | + | let nft_payment = $t044024479._1 | |
163 | + | let nft_amount = $t044024479._2 | |
164 | + | let gateway_payment = $t044024479._3 | |
165 | + | let gateway_amount = $t044024479._4 | |
152 | 166 | if ((nft_amount != 1)) | |
153 | 167 | then throw("No NFT attached") | |
154 | 168 | else { | |
155 | 169 | let nftId = if (if (isDefined(nft_payment.assetId)) | |
156 | 170 | then isSignArtNFT(value(nft_payment.assetId)) | |
157 | 171 | else false) | |
158 | 172 | then toBase58String(value(nft_payment.assetId)) | |
159 | 173 | else throw("Only SIGN Art NFT accepted.") | |
160 | 174 | let creatorFromNFTId = getCreatorFromNFTid(nftId) | |
161 | 175 | let erc20Addr = getCreatorERC20Addr(creatorFromNFTId) | |
162 | 176 | if ((size(erc20Addr) == 0)) | |
163 | 177 | then throw("This artist didn't allow crosschain transfer") | |
164 | 178 | else { | |
165 | 179 | let nftStatus = getStringByKey(keyNFTstatus(nftId)) | |
166 | 180 | if (if ((nftStatus == status_LOCKED)) | |
167 | 181 | then true | |
168 | 182 | else (nftStatus == status_PENDING)) | |
169 | 183 | then throw("NFT already locked") | |
170 | 184 | else { | |
171 | 185 | let gasFeeNonMinted = getIntegerByKeyFromOracle(keyFeeNonMinted) | |
172 | 186 | let gasFeeMinted = getIntegerByKeyFromOracle(keyFeeMinted) | |
173 | 187 | let isMinted = if ((nftStatus == status_UNLOCKED)) | |
174 | 188 | then true | |
175 | 189 | else false | |
176 | 190 | if (if (!(isDefined(gateway_payment.assetId))) | |
177 | 191 | then true | |
178 | 192 | else (toBase58String(value(gateway_payment.assetId)) != feeAcceptedAsset)) | |
179 | 193 | then throw("Wrong payment asset") | |
180 | 194 | else if (if (isMinted) | |
181 | 195 | then (gateway_amount > gasFeeMinted) | |
182 | 196 | else false) | |
183 | 197 | then throw("Wrong payment amount to unlock") | |
184 | 198 | else if (if (!(isMinted)) | |
185 | 199 | then (gateway_amount > gasFeeNonMinted) | |
186 | 200 | else false) | |
187 | 201 | then throw("Wrong payment amount to mint and unlock") | |
188 | 202 | 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)))] | |
189 | 203 | } | |
190 | 204 | } | |
191 | 205 | } | |
192 | 206 | } | |
193 | 207 | ||
194 | 208 | ||
195 | 209 | ||
196 | 210 | @Callable(i) | |
197 | 211 | func confirmLock (nftId,transferId) = if (!(isInit)) | |
198 | 212 | then throw("dApp not ready") | |
199 | 213 | else if (ownerOnly(i)) | |
200 | 214 | then { | |
201 | 215 | let nftStatus = getStringByKey(keyNFTstatus(nftId)) | |
202 | 216 | if ((nftStatus != status_PENDING)) | |
203 | 217 | then throw("NFT not pending") | |
204 | 218 | else { | |
205 | 219 | let val = getStringByKey(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING)) | |
206 | 220 | let newKey = ((keyTransferNFT(nftId, transferId) + "_") + status_CLOSED) | |
207 | 221 | [DeleteEntry(((keyTransferNFT(nftId, transferId) + "_") + status_PENDING)), StringEntry(newKey, val), StringEntry(keyNFTstatus(nftId), status_LOCKED)] | |
208 | 222 | } | |
209 | 223 | } | |
210 | 224 | else throw("Not allowed") | |
211 | 225 | ||
212 | 226 | ||
213 | 227 | ||
214 | 228 | @Callable(i) | |
215 | 229 | func unlock (recipient,nftId) = if (!(isInit)) | |
216 | 230 | then throw("dApp not ready") | |
217 | 231 | else if (ownerOnly(i)) | |
218 | 232 | then { | |
219 | 233 | let nftStatus = getStringByKey(keyNFTstatus(nftId)) | |
220 | 234 | if ((nftStatus != status_LOCKED)) | |
221 | 235 | then throw("NFT not locked, finalize first if pending") | |
222 | 236 | else [StringEntry(keyNFTstatus(nftId), status_UNLOCKED), ScriptTransfer(Address(fromBase58String(recipient)), 1, fromBase58String(nftId))] | |
223 | 237 | } | |
224 | 238 | else throw("Not allowed") | |
225 | 239 | ||
226 | 240 | ||
227 | 241 | ||
228 | 242 | @Callable(i) | |
229 | 243 | func appRunning (isLive,message) = if (!(isInit)) | |
230 | 244 | then throw("dApp not ready") | |
231 | 245 | else if (ownerOnly(i)) | |
232 | 246 | then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)] | |
233 | 247 | else throw("You are not allowed to change this") | |
234 | 248 | ||
235 | 249 | ||
236 | 250 | ||
237 | 251 | @Callable(i) | |
238 | 252 | func deleteEntry (entry) = if (ownerOnly(i)) | |
239 | 253 | then [DeleteEntry(entry)] | |
240 | 254 | else throw("no") | |
241 | 255 | ||
242 | 256 |
github/deemru/w8io/169f3d6 39.39 ms ◑