tx · DSwxhVbBnNBu8WsXLtzNjuJzbN4YvW9dX3AgPVEgMr68 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB: -0.01000000 Waves 2023.01.30 15:04 [2427679] smart account 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB > SELF 0.00000000 Waves
{ "type": 13, "id": "DSwxhVbBnNBu8WsXLtzNjuJzbN4YvW9dX3AgPVEgMr68", "fee": 1000000, "feeAssetId": null, "timestamp": 1675080314186, "version": 2, "chainId": 84, "sender": "3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB", "senderPublicKey": "Gd5NihbWQoWuTnSvq25TuV2BYZG4U1e9KDqZn9zBPix7", "proofs": [ "3MZ8rXn9qnPRAh2DsG2JWi66T16TGsmGJrJP4LMZKj9aNWJC5y9FMiy8pwNmodtgk48FYogKrewJV5KMNDBUKFNF" ], "script": "base64:BgIgCAISBAoCCAgSBwoFCAgICAgSBAoCCAgSABIFCgMIAQQVAAdWRVJTSU9OAgUxLjEuOQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAAPc3RvcmFnZVZlcmlmaWVyCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECE2NvbmZfb3JhY2xlX2FkZHJlc3MABGJhbmsJAQ5nZXRTdHJpbmdCeUtleQECGWNvbmZfZmVlX3JlY2VpdmVyX2FkZHJlc3MADWFjY2VwdGVkVG9rZW4JAQ5nZXRTdHJpbmdCeUtleQECFmNvbmZfYWNjZXB0ZWRfdG9rZW5faWQABnVzZG5JRAkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl91c2RuX2lkAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQISY29uZl9hZG1pbl9hZGRyZXNzABNzaWduX2FydF91c2Vyc19kYXBwCQEOZ2V0U3RyaW5nQnlLZXkBAiBjb25mX3NpZ25fYXJ0X3VzZXJzX2RhcHBfYWRkcmVzc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ZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MABAMDAwMJAAACCAUDaW52CGZ1bmN0aW9uAhNyZXZva2VDZXJ0aWZpY2F0aW9uCQAAAggFA2ludgRkQXBwBQR0aGlzBwkAAAIIBQNpbnYDZmVlAKDCHgcJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQDZBAEJAQhhc1N0cmluZwEJAJEDAggFA2ludgRhcmdzAAEJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXml82NV", "height": 2427679, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C3wwimAiH4FDwpKSrAdK8hLK9Q5wdwNjPw3jTuht68Yw Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let VERSION = "1.1.9" | |
5 | 5 | ||
6 | 6 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | let storageVerifier = value(addressFromString(getStringByKey("conf_oracle_address"))) | |
10 | 10 | ||
11 | 11 | let bank = getStringByKey("conf_fee_receiver_address") | |
12 | 12 | ||
13 | 13 | let acceptedToken = getStringByKey("conf_accepted_token_id") | |
14 | 14 | ||
15 | 15 | let usdnID = getStringByKey("conf_usdn_id") | |
16 | 16 | ||
17 | 17 | let chris = getStringByKey("conf_admin_address") | |
18 | 18 | ||
19 | 19 | let sign_art_users_dapp = getStringByKey("conf_sign_art_users_dapp_address") | |
20 | 20 | ||
21 | 21 | let storageFeeMultiplier = 1 | |
22 | 22 | ||
23 | 23 | func checkEntry (prefix,uuid) = match getString(this, (prefix + uuid)) { | |
24 | 24 | case a: String => | |
25 | 25 | a | |
26 | 26 | case _ => | |
27 | 27 | "NONE" | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func checkEntryEmail (uuid,domain) = match getString(this, ((uuid + "@") + domain)) { | |
32 | 32 | case a: String => | |
33 | 33 | a | |
34 | 34 | case _ => | |
35 | 35 | "NONE" | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func checkUUID (uuid) = match getString(this, uuid) { | |
40 | 40 | case a: String => | |
41 | 41 | a | |
42 | 42 | case _ => | |
43 | 43 | "NONE" | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func checkIfWhiteListed (callerAddress) = match getInteger(this, ("addr_WHITELISTED_" + callerAddress)) { | |
48 | 48 | case a: Int => | |
49 | 49 | a | |
50 | 50 | case _ => | |
51 | 51 | 0 | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func isAdress (addr) = if (if (if ((size(addr) == 35)) | |
56 | 56 | then (take(addr, 2) == "3P") | |
57 | 57 | else false) | |
58 | 58 | then true | |
59 | 59 | else (take(addr, 2) == "3N")) | |
60 | 60 | then true | |
61 | 61 | else (take(addr, 2) == "3M") | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func countParties (accumulator,addr) = if ((size(addr) > 0)) | |
65 | 65 | then (accumulator + 1) | |
66 | 66 | else (accumulator + 0) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func checkIfPendingToSign (key) = match getString(this, key) { | |
70 | 70 | case a: String => | |
71 | 71 | if ((a == "PENDING")) | |
72 | 72 | then true | |
73 | 73 | else false | |
74 | 74 | case _ => | |
75 | 75 | false | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\""))) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getValue (json,key) = { | |
83 | 83 | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
84 | 84 | let data = drop(json, ((keyIndex + size(key)) + 3)) | |
85 | 85 | let jsonValue = getValueString(data) | |
86 | 86 | jsonValue | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getJsonBeforeValue (json,key) = { | |
91 | 91 | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
92 | 92 | let data = take(json, ((keyIndex + size(key)) + 3)) | |
93 | 93 | data | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getJsonAfterValue (json,key) = { | |
98 | 98 | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
99 | 99 | let data = takeRight(json, (size(json) - ((((keyIndex + size(key)) + 3) + 0) + 2))) | |
100 | 100 | data | |
101 | 101 | } | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func asString (bv) = match bv { | |
105 | 105 | case bv0: String => | |
106 | 106 | bv0 | |
107 | 107 | case _ => | |
108 | 108 | throw("Sponsored Public Key String expected") | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(invoke) | |
113 | 113 | func setConf (key,val) = { | |
114 | 114 | let caller = toString(invoke.caller) | |
115 | 115 | if (containsElement([chris, toString(this)], caller)) | |
116 | 116 | then if (contains(key, "conf_")) | |
117 | 117 | then [StringEntry(key, val)] | |
118 | 118 | else throw("Entries starting with conf_ only") | |
119 | 119 | else throw("You are not allowed to change this") | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | ||
124 | 124 | @Callable(invoke) | |
125 | 125 | func fileCertification (hash,title,uuid,ipfs,signerPubKey) = { | |
126 | 126 | let id = value(invoke.transactionId) | |
127 | 127 | let entryExist = checkEntry(hash, uuid) | |
128 | 128 | let uuidExist = checkUUID(uuid) | |
129 | 129 | let callerIsDapp = (this == invoke.caller) | |
130 | 130 | let callerAddress = if (callerIsDapp) | |
131 | 131 | then toString(addressFromPublicKey(fromBase58String(signerPubKey))) | |
132 | 132 | else toBase58String(invoke.caller.bytes) | |
133 | 133 | let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress) | |
134 | 134 | if ((entryExist != "NONE")) | |
135 | 135 | then throw("This entry already exist") | |
136 | 136 | else if ((uuidExist != "NONE")) | |
137 | 137 | then throw("This uuid already exist") | |
138 | 138 | else if ((size(uuid) != 36)) | |
139 | 139 | then throw("Uuid should be 36 characters.") | |
140 | 140 | else if ((size(hash) != 64)) | |
141 | 141 | then throw("Hash should be 64 characters.") | |
142 | 142 | else if ((size(title) > 100)) | |
143 | 143 | then throw("Title is too long, 100 characters max.") | |
144 | 144 | else if (if (if (contains(hash, "\"")) | |
145 | 145 | then true | |
146 | 146 | else contains(title, "\"")) | |
147 | 147 | then true | |
148 | 148 | else contains(ipfs, "\"")) | |
149 | 149 | then throw("No \" allowed") | |
150 | 150 | else { | |
151 | 151 | let data = (((((((("{\"hash\":\"" + hash) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + title) + "\",\"ipfs\":\"") + ipfs) + "\"}") | |
152 | 152 | if ((callerIsWhiteListedNum > 0)) | |
153 | 153 | then { | |
154 | 154 | let creditCost = if ((size(ipfs) != 0)) | |
155 | 155 | then (1 + storageFeeMultiplier) | |
156 | 156 | else 1 | |
157 | 157 | if ((0 > (callerIsWhiteListedNum - creditCost))) | |
158 | 158 | then throw("Not enough credit") | |
159 | 159 | else [StringEntry(uuid, toBase58String(id)), StringEntry((hash + uuid), toBase58String(id)), StringEntry((title + uuid), toBase58String(id)), IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - creditCost)), StringEntry(((("data_fc_" + toBase58String(id)) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(callerAddress), 0, fromBase58String(acceptedToken))] | |
160 | 160 | } | |
161 | 161 | else if (!(callerIsDapp)) | |
162 | 162 | then { | |
163 | 163 | let payment = value(invoke.payments[0]) | |
164 | 164 | let amount = value(payment.amount) | |
165 | 165 | let paymentAssetId = if (isDefined(payment.assetId)) | |
166 | 166 | then value(payment.assetId) | |
167 | 167 | else throw("Waves is not accepted as payment") | |
168 | 168 | let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
169 | 169 | let feeCost = if ((size(ipfs) != 0)) | |
170 | 170 | then (currentPrice + (storageFeeMultiplier * currentPrice)) | |
171 | 171 | else currentPrice | |
172 | 172 | if ((fromBase58String(acceptedToken) != paymentAssetId)) | |
173 | 173 | then throw("This token is not accepted at the moment") | |
174 | 174 | else if (if ((amount != feeCost)) | |
175 | 175 | then (0 >= callerIsWhiteListedNum) | |
176 | 176 | else false) | |
177 | 177 | then throw("The price is wrong") | |
178 | 178 | else [StringEntry(uuid, toBase58String(id)), StringEntry((hash + uuid), toBase58String(id)), StringEntry((title + uuid), toBase58String(id)), StringEntry(((("data_fc_" + toBase58String(id)) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(bank), feeCost, payment.assetId)] | |
179 | 179 | } | |
180 | 180 | else throw("You are not allowed to do that") | |
181 | 181 | } | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(invoke) | |
187 | 187 | func revokeCertification (certificationId,signerPubKey) = { | |
188 | 188 | let id = value(invoke.transactionId) | |
189 | 189 | let callerIsDapp = (this == invoke.caller) | |
190 | 190 | let callerAddress = if (callerIsDapp) | |
191 | 191 | then toString(addressFromPublicKey(fromBase58String(signerPubKey))) | |
192 | 192 | else toBase58String(invoke.caller.bytes) | |
193 | 193 | let entryExist = match getString(this, ((("data_fc_" + certificationId) + "_") + callerAddress)) { | |
194 | 194 | case a: String => | |
195 | 195 | a | |
196 | 196 | case _ => | |
197 | 197 | "NONE" | |
198 | 198 | } | |
199 | 199 | let isRevoked = match getString(this, ("STATUS_FC_" + certificationId)) { | |
200 | 200 | case a: String => | |
201 | 201 | a | |
202 | 202 | case _ => | |
203 | 203 | "NONE" | |
204 | 204 | } | |
205 | 205 | let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress) | |
206 | 206 | let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}") | |
207 | 207 | if ((isRevoked != "NONE")) | |
208 | 208 | then throw("This certification have already been revoked.") | |
209 | 209 | else if ((entryExist == "NONE")) | |
210 | 210 | then throw("You cannot change the status of this certification.") | |
211 | 211 | else if ((callerIsWhiteListedNum > 0)) | |
212 | 212 | then [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(callerAddress), 0, fromBase58String(acceptedToken))] | |
213 | 213 | else if (!(callerIsDapp)) | |
214 | 214 | then { | |
215 | 215 | let payment = value(invoke.payments[0]) | |
216 | 216 | let amount = value(payment.amount) | |
217 | 217 | let paymentAssetId = if (isDefined(payment.assetId)) | |
218 | 218 | then value(payment.assetId) | |
219 | 219 | else throw("Waves is not accepted as payment") | |
220 | 220 | let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
221 | 221 | if ((fromBase58String(acceptedToken) != paymentAssetId)) | |
222 | 222 | then throw("This token is not accepted at the moment") | |
223 | 223 | else if (if ((amount != currentPrice)) | |
224 | 224 | then (0 >= callerIsWhiteListedNum) | |
225 | 225 | else false) | |
226 | 226 | then throw("The price is wrong") | |
227 | 227 | else [StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)] | |
228 | 228 | } | |
229 | 229 | else throw("You are not allowed to do that") | |
230 | 230 | } | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | ||
234 | 234 | @Callable(invoke) | |
235 | 235 | func usdnSignCredits () = { | |
236 | 236 | let payment = value(invoke.payments[0]) | |
237 | 237 | let callerAddress = toBase58String(invoke.caller.bytes) | |
238 | 238 | let tokenId = value(payment.assetId) | |
239 | 239 | let amount = value(payment.amount) | |
240 | 240 | let numberOfCredits = ((amount * 2) / 1000000) | |
241 | 241 | let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress) | |
242 | 242 | if ((toBase58String(tokenId) != usdnID)) | |
243 | 243 | then throw("Only USDN can be exchanged") | |
244 | 244 | else if (if (((amount % 1000000) != 0)) | |
245 | 245 | then ((amount % 1000000) != 500000) | |
246 | 246 | else false) | |
247 | 247 | then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(amount), 6)) + ".") + takeRight(toString(amount), 6))) | |
248 | 248 | else [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits)), ScriptTransfer(addressFromStringValue(bank), amount, tokenId)] | |
249 | 249 | } | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | ||
253 | 253 | @Callable(i) | |
254 | 254 | func whitelistFreeCertifications (address,amount,addToCurrentAmount) = { | |
255 | 255 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
256 | 256 | let id = toBase58String(i.transactionId) | |
257 | 257 | if (containsElement([chris, sign_art_users_dapp], caller)) | |
258 | 258 | then { | |
259 | 259 | let currentAmount = valueOrElse(getInteger(this, ("addr_WHITELISTED_" + address)), 0) | |
260 | 260 | let newAmount = if (addToCurrentAmount) | |
261 | 261 | then (currentAmount + amount) | |
262 | 262 | else amount | |
263 | 263 | [IntegerEntry(("addr_WHITELISTED_" + address), newAmount)] | |
264 | 264 | } | |
265 | 265 | else throw("You are not authorized to whitelist txs") | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | @Verifier(tx) | |
270 | 270 | func verifier () = match tx { | |
271 | 271 | case inv: InvokeScriptTransaction => | |
272 | 272 | if (if (if (if ((inv.function == "fileCertification")) | |
273 | 273 | then (inv.dApp == this) | |
274 | 274 | else false) | |
275 | 275 | then (inv.fee == 500000) | |
276 | 276 | else false) | |
277 | 277 | then (inv.feeAssetId == unit) | |
278 | 278 | else false) | |
279 | 279 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[4]))) | |
280 | 280 | else if (if (if (if ((inv.function == "revokeCertification")) | |
281 | 281 | then (inv.dApp == this) | |
282 | 282 | else false) | |
283 | 283 | then (inv.fee == 500000) | |
284 | 284 | else false) | |
285 | 285 | then (inv.feeAssetId == unit) | |
286 | 286 | else false) | |
287 | 287 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[1]))) | |
288 | 288 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
289 | 289 | case _ => | |
290 | 290 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
291 | 291 | } | |
292 | 292 |
github/deemru/w8io/026f985 55.65 ms ◑