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:BgIgCAISBAoCCAgSBwoFCAgICAgSBAoCCAgSABIFCgMIAQQVAAdWRVJTSU9OAgUxLjEuOQEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAAPc3RvcmFnZVZlcmlmaWVyCQEFdmFsdWUBCQCmCAEJAQ5nZXRTdHJpbmdCeUtleQECE2NvbmZfb3JhY2xlX2FkZHJlc3MABGJhbmsJAQ5nZXRTdHJpbmdCeUtleQECGWNvbmZfZmVlX3JlY2VpdmVyX2FkZHJlc3MADWFjY2VwdGVkVG9rZW4JAQ5nZXRTdHJpbmdCeUtleQECFmNvbmZfYWNjZXB0ZWRfdG9rZW5faWQABnVzZG5JRAkBDmdldFN0cmluZ0J5S2V5AQIMY29uZl91c2RuX2lkAAVjaHJpcwkBDmdldFN0cmluZ0J5S2V5AQISY29uZl9hZG1pbl9hZGRyZXNzABNzaWduX2FydF91c2Vyc19kYXBwCQEOZ2V0U3RyaW5nQnlLZXkBAiBjb25mX3NpZ25fYXJ0X3VzZXJzX2RhcHBfYWRkcmVz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vZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MABAMDAwMJAAACCAUDaW52CGZ1bmN0aW9uAhNyZXZva2VDZXJ0aWZpY2F0aW9uCQAAAggFA2ludgRkQXBwBQR0aGlzBwkAAAIIBQNpbnYDZmVlAKDCHgcJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQDZBAEJAQhhc1N0cmluZwEJAJEDAggFA2ludgRhcmdzAAEJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXml82NV", "height": 2427679, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C3wwimAiH4FDwpKSrAdK8hLK9Q5wdwNjPw3jTuht68Yw Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VERSION = "1.1.9"
55
66 func getStringByKey (key) = valueOrElse(getString(this, key), "")
77
88
99 let storageVerifier = value(addressFromString(getStringByKey("conf_oracle_address")))
1010
1111 let bank = getStringByKey("conf_fee_receiver_address")
1212
1313 let acceptedToken = getStringByKey("conf_accepted_token_id")
1414
1515 let usdnID = getStringByKey("conf_usdn_id")
1616
1717 let chris = getStringByKey("conf_admin_address")
1818
1919 let sign_art_users_dapp = getStringByKey("conf_sign_art_users_dapp_address")
2020
2121 let storageFeeMultiplier = 1
2222
2323 func checkEntry (prefix,uuid) = match getString(this, (prefix + uuid)) {
2424 case a: String =>
2525 a
2626 case _ =>
2727 "NONE"
2828 }
2929
3030
3131 func checkEntryEmail (uuid,domain) = match getString(this, ((uuid + "@") + domain)) {
3232 case a: String =>
3333 a
3434 case _ =>
3535 "NONE"
3636 }
3737
3838
3939 func checkUUID (uuid) = match getString(this, uuid) {
4040 case a: String =>
4141 a
4242 case _ =>
4343 "NONE"
4444 }
4545
4646
4747 func checkIfWhiteListed (callerAddress) = match getInteger(this, ("addr_WHITELISTED_" + callerAddress)) {
4848 case a: Int =>
4949 a
5050 case _ =>
5151 0
5252 }
5353
5454
5555 func isAdress (addr) = if (if (if ((size(addr) == 35))
5656 then (take(addr, 2) == "3P")
5757 else false)
5858 then true
5959 else (take(addr, 2) == "3N"))
6060 then true
6161 else (take(addr, 2) == "3M")
6262
6363
6464 func countParties (accumulator,addr) = if ((size(addr) > 0))
6565 then (accumulator + 1)
6666 else (accumulator + 0)
6767
6868
6969 func checkIfPendingToSign (key) = match getString(this, key) {
7070 case a: String =>
7171 if ((a == "PENDING"))
7272 then true
7373 else false
7474 case _ =>
7575 false
7676 }
7777
7878
7979 func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\"")))
8080
8181
8282 func getValue (json,key) = {
8383 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
8484 let data = drop(json, ((keyIndex + size(key)) + 3))
8585 let jsonValue = getValueString(data)
8686 jsonValue
8787 }
8888
8989
9090 func getJsonBeforeValue (json,key) = {
9191 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
9292 let data = take(json, ((keyIndex + size(key)) + 3))
9393 data
9494 }
9595
9696
9797 func getJsonAfterValue (json,key) = {
9898 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
9999 let data = takeRight(json, (size(json) - ((((keyIndex + size(key)) + 3) + 0) + 2)))
100100 data
101101 }
102102
103103
104104 func asString (bv) = match bv {
105105 case bv0: String =>
106106 bv0
107107 case _ =>
108108 throw("Sponsored Public Key String expected")
109109 }
110110
111111
112112 @Callable(invoke)
113113 func setConf (key,val) = {
114114 let caller = toString(invoke.caller)
115115 if (containsElement([chris, toString(this)], caller))
116116 then if (contains(key, "conf_"))
117117 then [StringEntry(key, val)]
118118 else throw("Entries starting with conf_ only")
119119 else throw("You are not allowed to change this")
120120 }
121121
122122
123123
124124 @Callable(invoke)
125125 func fileCertification (hash,title,uuid,ipfs,signerPubKey) = {
126126 let id = value(invoke.transactionId)
127127 let entryExist = checkEntry(hash, uuid)
128128 let uuidExist = checkUUID(uuid)
129129 let callerIsDapp = (this == invoke.caller)
130130 let callerAddress = if (callerIsDapp)
131131 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
132132 else toBase58String(invoke.caller.bytes)
133133 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
134134 if ((entryExist != "NONE"))
135135 then throw("This entry already exist")
136136 else if ((uuidExist != "NONE"))
137137 then throw("This uuid already exist")
138138 else if ((size(uuid) != 36))
139139 then throw("Uuid should be 36 characters.")
140140 else if ((size(hash) != 64))
141141 then throw("Hash should be 64 characters.")
142142 else if ((size(title) > 100))
143143 then throw("Title is too long, 100 characters max.")
144144 else if (if (if (contains(hash, "\""))
145145 then true
146146 else contains(title, "\""))
147147 then true
148148 else contains(ipfs, "\""))
149149 then throw("No \" allowed")
150150 else {
151151 let data = (((((((("{\"hash\":\"" + hash) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + title) + "\",\"ipfs\":\"") + ipfs) + "\"}")
152152 if ((callerIsWhiteListedNum > 0))
153153 then {
154154 let creditCost = if ((size(ipfs) != 0))
155155 then (1 + storageFeeMultiplier)
156156 else 1
157157 if ((0 > (callerIsWhiteListedNum - creditCost)))
158158 then throw("Not enough credit")
159159 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))]
160160 }
161161 else if (!(callerIsDapp))
162162 then {
163163 let payment = value(invoke.payments[0])
164164 let amount = value(payment.amount)
165165 let paymentAssetId = if (isDefined(payment.assetId))
166166 then value(payment.assetId)
167167 else throw("Waves is not accepted as payment")
168168 let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
169169 let feeCost = if ((size(ipfs) != 0))
170170 then (currentPrice + (storageFeeMultiplier * currentPrice))
171171 else currentPrice
172172 if ((fromBase58String(acceptedToken) != paymentAssetId))
173173 then throw("This token is not accepted at the moment")
174174 else if (if ((amount != feeCost))
175175 then (0 >= callerIsWhiteListedNum)
176176 else false)
177177 then throw("The price is wrong")
178178 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)]
179179 }
180180 else throw("You are not allowed to do that")
181181 }
182182 }
183183
184184
185185
186186 @Callable(invoke)
187187 func revokeCertification (certificationId,signerPubKey) = {
188188 let id = value(invoke.transactionId)
189189 let callerIsDapp = (this == invoke.caller)
190190 let callerAddress = if (callerIsDapp)
191191 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
192192 else toBase58String(invoke.caller.bytes)
193193 let entryExist = match getString(this, ((("data_fc_" + certificationId) + "_") + callerAddress)) {
194194 case a: String =>
195195 a
196196 case _ =>
197197 "NONE"
198198 }
199199 let isRevoked = match getString(this, ("STATUS_FC_" + certificationId)) {
200200 case a: String =>
201201 a
202202 case _ =>
203203 "NONE"
204204 }
205205 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
206206 let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}")
207207 if ((isRevoked != "NONE"))
208208 then throw("This certification have already been revoked.")
209209 else if ((entryExist == "NONE"))
210210 then throw("You cannot change the status of this certification.")
211211 else if ((callerIsWhiteListedNum > 0))
212212 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))]
213213 else if (!(callerIsDapp))
214214 then {
215215 let payment = value(invoke.payments[0])
216216 let amount = value(payment.amount)
217217 let paymentAssetId = if (isDefined(payment.assetId))
218218 then value(payment.assetId)
219219 else throw("Waves is not accepted as payment")
220220 let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
221221 if ((fromBase58String(acceptedToken) != paymentAssetId))
222222 then throw("This token is not accepted at the moment")
223223 else if (if ((amount != currentPrice))
224224 then (0 >= callerIsWhiteListedNum)
225225 else false)
226226 then throw("The price is wrong")
227227 else [StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]
228228 }
229229 else throw("You are not allowed to do that")
230230 }
231231
232232
233233
234234 @Callable(invoke)
235235 func usdnSignCredits () = {
236236 let payment = value(invoke.payments[0])
237237 let callerAddress = toBase58String(invoke.caller.bytes)
238238 let tokenId = value(payment.assetId)
239239 let amount = value(payment.amount)
240240 let numberOfCredits = ((amount * 2) / 1000000)
241241 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
242242 if ((toBase58String(tokenId) != usdnID))
243243 then throw("Only USDN can be exchanged")
244244 else if (if (((amount % 1000000) != 0))
245245 then ((amount % 1000000) != 500000)
246246 else false)
247247 then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(amount), 6)) + ".") + takeRight(toString(amount), 6)))
248248 else [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits)), ScriptTransfer(addressFromStringValue(bank), amount, tokenId)]
249249 }
250250
251251
252252
253253 @Callable(i)
254254 func whitelistFreeCertifications (address,amount,addToCurrentAmount) = {
255255 let caller = toString(addressFromPublicKey(i.callerPublicKey))
256256 let id = toBase58String(i.transactionId)
257257 if (containsElement([chris, sign_art_users_dapp], caller))
258258 then {
259259 let currentAmount = valueOrElse(getInteger(this, ("addr_WHITELISTED_" + address)), 0)
260260 let newAmount = if (addToCurrentAmount)
261261 then (currentAmount + amount)
262262 else amount
263263 [IntegerEntry(("addr_WHITELISTED_" + address), newAmount)]
264264 }
265265 else throw("You are not authorized to whitelist txs")
266266 }
267267
268268
269269 @Verifier(tx)
270270 func verifier () = match tx {
271271 case inv: InvokeScriptTransaction =>
272272 if (if (if (if ((inv.function == "fileCertification"))
273273 then (inv.dApp == this)
274274 else false)
275275 then (inv.fee == 500000)
276276 else false)
277277 then (inv.feeAssetId == unit)
278278 else false)
279279 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[4])))
280280 else if (if (if (if ((inv.function == "revokeCertification"))
281281 then (inv.dApp == this)
282282 else false)
283283 then (inv.fee == 500000)
284284 else false)
285285 then (inv.feeAssetId == unit)
286286 else false)
287287 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[1])))
288288 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
289289 case _ =>
290290 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
291291 }
292292

github/deemru/w8io/026f985 
55.65 ms