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