tx · 2o2dtQg6hmzgc1oU1odW2V3t2QnEQ66GRmfwXFc3bozr

3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB:  -0.01000000 Waves

2023.01.21 12:40 [2414568] smart account 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB > SELF 0.00000000 Waves

{ "type": 13, "id": "2o2dtQg6hmzgc1oU1odW2V3t2QnEQ66GRmfwXFc3bozr", "fee": 1000000, "feeAssetId": null, "timestamp": 1674294072737, "version": 2, "chainId": 84, "sender": "3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB", "senderPublicKey": "Gd5NihbWQoWuTnSvq25TuV2BYZG4U1e9KDqZn9zBPix7", "proofs": [ "5GmieFcRWs6seKTNB6rmxUcdTfRMbRn71BWvy4PQuHYGdnyqb2uUcyRPEqJ4Cte6xKwLDE3JsA1UD8FqPHcKWH1y" ], "script": "base64:BgIgCAISBAoCCAgSBwoFCAgICAgSBAoCCAgSABIFCgMIAQQUAQ5nZXRTdHJpbmdCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMFA2tleQIAAA9zdG9yYWdlVmVyaWZpZXIJAQV2YWx1ZQEJAKYIAQkBDmdldFN0cmluZ0J5S2V5AQITY29uZl9vcmFjbGVfYWRkcmVzcwAEYmFuawkBDmdldFN0cmluZ0J5S2V5AQIZY29uZl9mZWVfcmVjZWl2ZXJfYWRkcmVzcwANYWNjZXB0ZWRUb2tlbgkBDmdldFN0cmluZ0J5S2V5AQIZY29uZl9mZWVfcmVjZWl2ZXJfYWRkcmVzcwAGdXNkbklECQEOZ2V0U3RyaW5nQnlLZXkBAgxjb25mX3VzZG5faWQABWNocmlzCQEOZ2V0U3RyaW5nQnlLZXkBAhJjb25mX2FkbWluX2FkZHJlc3MAB1ZFUlNJT04CBTEuMS45ABRzdG9yYWdlRmVlTXVsdGlwbGllcgABAQpjaGVja0VudHJ5AgZwcmVmaXgEdXVpZAQHJG1hdGNoMAkAnQgCBQR0aGlzCQ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rZUNlcnRpZmljYXRpb24JAAACCAUDaW52BGRBcHAFBHRoaXMHCQAAAggFA2ludgNmZWUAoMIeBwkAAAIIBQNpbnYKZmVlQXNzZXRJZAUEdW5pdAcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBCGFzU3RyaW5nAQkAkQMCCAUDaW52BGFyZ3MAAQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQUDLB0=", "height": 2414568, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EgWXwdPZ3wgVer7b8GqNk4aCwTFNidQUGMKzvMNHvZH Next: 3hv7nh6pXSN4HDvwpWeExJ2rTDaoaYPtN6RsfFydbixo Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
4+func getStringByKey (key) = valueOrElse(getString(this, key), "")
55
6-let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
76
8-let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
7+let storageVerifier = value(addressFromString(getStringByKey("conf_oracle_address")))
98
10-let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"
9+let bank = getStringByKey("conf_fee_receiver_address")
10+
11+let acceptedToken = getStringByKey("conf_fee_receiver_address")
12+
13+let usdnID = getStringByKey("conf_usdn_id")
14+
15+let chris = getStringByKey("conf_admin_address")
1116
1217 let VERSION = "1.1.9"
1318
103108
104109
105110 @Callable(invoke)
111+func setConf (key,val) = {
112+ let caller = toString(invoke.caller)
113+ if (containsElement([chris, toString(this)], caller))
114+ then if (contains(key, "conf_"))
115+ then [StringEntry(key, val)]
116+ else throw("Entries starting with conf_ only")
117+ else throw("You are not allowed to change this")
118+ }
119+
120+
121+
122+@Callable(invoke)
106123 func fileCertification (hash,title,uuid,ipfs,signerPubKey) = {
107124 let id = value(invoke.transactionId)
108125 let entryExist = checkEntry(hash, uuid)
137154 else 1
138155 if ((0 > (callerIsWhiteListedNum - creditCost)))
139156 then throw("Not enough credit")
140- 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, acceptedToken)]
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, toBytes(acceptedToken))]
141158 }
142159 else if (!(callerIsDapp))
143160 then {
150167 let feeCost = if ((size(ipfs) != 0))
151168 then (currentPrice + (storageFeeMultiplier * currentPrice))
152169 else currentPrice
153- if ((acceptedToken != paymentAssetId))
170+ if ((toBytes(acceptedToken) != paymentAssetId))
154171 then throw("This token is not accepted at the moment")
155172 else if (if ((amount != feeCost))
156173 then (0 >= callerIsWhiteListedNum)
190207 else if ((entryExist == "NONE"))
191208 then throw("You cannot change the status of this certification.")
192209 else if ((callerIsWhiteListedNum > 0))
193- then [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]
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, toBytes(acceptedToken))]
194211 else if (!(callerIsDapp))
195212 then {
196213 let payment = value(invoke.payments[0])
199216 then value(payment.assetId)
200217 else throw("Waves is not accepted as payment")
201218 let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
202- if ((acceptedToken != paymentAssetId))
219+ if ((toBytes(acceptedToken) != paymentAssetId))
203220 then throw("This token is not accepted at the moment")
204221 else if (if ((amount != currentPrice))
205222 then (0 >= callerIsWhiteListedNum)
227244 else false)
228245 then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(amount), 6)) + ".") + takeRight(toString(amount), 6)))
229246 else [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits)), ScriptTransfer(addressFromStringValue(bank), amount, tokenId)]
247+ }
248+
249+
250+
251+@Callable(i)
252+func whitelistFreeCertifications (address,amount,addToCurrentAmount) = {
253+ let caller = toString(addressFromPublicKey(i.callerPublicKey))
254+ let id = toBase58String(i.transactionId)
255+ if (containsElement([chris], caller))
256+ then {
257+ let currentAmount = valueOrElse(getInteger(this, (address + "_free_txq")), 0)
258+ let newAmount = if (addToCurrentAmount)
259+ then (currentAmount + amount)
260+ else amount
261+[IntegerEntry((address + "_free_txs"), newAmount)]
262+ }
263+ else throw("You are not authorized to whitelist txs")
230264 }
231265
232266
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
4+func getStringByKey (key) = valueOrElse(getString(this, key), "")
55
6-let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
76
8-let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
7+let storageVerifier = value(addressFromString(getStringByKey("conf_oracle_address")))
98
10-let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"
9+let bank = getStringByKey("conf_fee_receiver_address")
10+
11+let acceptedToken = getStringByKey("conf_fee_receiver_address")
12+
13+let usdnID = getStringByKey("conf_usdn_id")
14+
15+let chris = getStringByKey("conf_admin_address")
1116
1217 let VERSION = "1.1.9"
1318
1419 let storageFeeMultiplier = 1
1520
1621 func checkEntry (prefix,uuid) = match getString(this, (prefix + uuid)) {
1722 case a: String =>
1823 a
1924 case _ =>
2025 "NONE"
2126 }
2227
2328
2429 func checkEntryEmail (uuid,domain) = match getString(this, ((uuid + "@") + domain)) {
2530 case a: String =>
2631 a
2732 case _ =>
2833 "NONE"
2934 }
3035
3136
3237 func checkUUID (uuid) = match getString(this, uuid) {
3338 case a: String =>
3439 a
3540 case _ =>
3641 "NONE"
3742 }
3843
3944
4045 func checkIfWhiteListed (callerAddress) = match getInteger(this, ("addr_WHITELISTED_" + callerAddress)) {
4146 case a: Int =>
4247 a
4348 case _ =>
4449 0
4550 }
4651
4752
4853 func isAdress (addr) = if (if (if ((size(addr) == 35))
4954 then (take(addr, 2) == "3P")
5055 else false)
5156 then true
5257 else (take(addr, 2) == "3N"))
5358 then true
5459 else (take(addr, 2) == "3M")
5560
5661
5762 func countParties (accumulator,addr) = if ((size(addr) > 0))
5863 then (accumulator + 1)
5964 else (accumulator + 0)
6065
6166
6267 func checkIfPendingToSign (key) = match getString(this, key) {
6368 case a: String =>
6469 if ((a == "PENDING"))
6570 then true
6671 else false
6772 case _ =>
6873 false
6974 }
7075
7176
7277 func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\"")))
7378
7479
7580 func getValue (json,key) = {
7681 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
7782 let data = drop(json, ((keyIndex + size(key)) + 3))
7883 let jsonValue = getValueString(data)
7984 jsonValue
8085 }
8186
8287
8388 func getJsonBeforeValue (json,key) = {
8489 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
8590 let data = take(json, ((keyIndex + size(key)) + 3))
8691 data
8792 }
8893
8994
9095 func getJsonAfterValue (json,key) = {
9196 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
9297 let data = takeRight(json, (size(json) - ((((keyIndex + size(key)) + 3) + 0) + 2)))
9398 data
9499 }
95100
96101
97102 func asString (bv) = match bv {
98103 case bv0: String =>
99104 bv0
100105 case _ =>
101106 throw("Sponsored Public Key String expected")
102107 }
103108
104109
105110 @Callable(invoke)
111+func setConf (key,val) = {
112+ let caller = toString(invoke.caller)
113+ if (containsElement([chris, toString(this)], caller))
114+ then if (contains(key, "conf_"))
115+ then [StringEntry(key, val)]
116+ else throw("Entries starting with conf_ only")
117+ else throw("You are not allowed to change this")
118+ }
119+
120+
121+
122+@Callable(invoke)
106123 func fileCertification (hash,title,uuid,ipfs,signerPubKey) = {
107124 let id = value(invoke.transactionId)
108125 let entryExist = checkEntry(hash, uuid)
109126 let uuidExist = checkUUID(uuid)
110127 let callerIsDapp = (this == invoke.caller)
111128 let callerAddress = if (callerIsDapp)
112129 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
113130 else toBase58String(invoke.caller.bytes)
114131 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
115132 if ((entryExist != "NONE"))
116133 then throw("This entry already exist")
117134 else if ((uuidExist != "NONE"))
118135 then throw("This uuid already exist")
119136 else if ((size(uuid) != 36))
120137 then throw("Uuid should be 36 characters.")
121138 else if ((size(hash) != 64))
122139 then throw("Hash should be 64 characters.")
123140 else if ((size(title) > 100))
124141 then throw("Title is too long, 100 characters max.")
125142 else if (if (if (contains(hash, "\""))
126143 then true
127144 else contains(title, "\""))
128145 then true
129146 else contains(ipfs, "\""))
130147 then throw("No \" allowed")
131148 else {
132149 let data = (((((((("{\"hash\":\"" + hash) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + title) + "\",\"ipfs\":\"") + ipfs) + "\"}")
133150 if ((callerIsWhiteListedNum > 0))
134151 then {
135152 let creditCost = if ((size(ipfs) != 0))
136153 then (1 + storageFeeMultiplier)
137154 else 1
138155 if ((0 > (callerIsWhiteListedNum - creditCost)))
139156 then throw("Not enough credit")
140- 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, acceptedToken)]
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, toBytes(acceptedToken))]
141158 }
142159 else if (!(callerIsDapp))
143160 then {
144161 let payment = value(invoke.payments[0])
145162 let amount = value(payment.amount)
146163 let paymentAssetId = if (isDefined(payment.assetId))
147164 then value(payment.assetId)
148165 else throw("Waves is not accepted as payment")
149166 let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
150167 let feeCost = if ((size(ipfs) != 0))
151168 then (currentPrice + (storageFeeMultiplier * currentPrice))
152169 else currentPrice
153- if ((acceptedToken != paymentAssetId))
170+ if ((toBytes(acceptedToken) != paymentAssetId))
154171 then throw("This token is not accepted at the moment")
155172 else if (if ((amount != feeCost))
156173 then (0 >= callerIsWhiteListedNum)
157174 else false)
158175 then throw("The price is wrong")
159176 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)]
160177 }
161178 else throw("You are not allowed to do that")
162179 }
163180 }
164181
165182
166183
167184 @Callable(invoke)
168185 func revokeCertification (certificationId,signerPubKey) = {
169186 let id = value(invoke.transactionId)
170187 let callerIsDapp = (this == invoke.caller)
171188 let callerAddress = if (callerIsDapp)
172189 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
173190 else toBase58String(invoke.caller.bytes)
174191 let entryExist = match getString(this, ((("data_fc_" + certificationId) + "_") + callerAddress)) {
175192 case a: String =>
176193 a
177194 case _ =>
178195 "NONE"
179196 }
180197 let isRevoked = match getString(this, ("STATUS_FC_" + certificationId)) {
181198 case a: String =>
182199 a
183200 case _ =>
184201 "NONE"
185202 }
186203 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
187204 let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}")
188205 if ((isRevoked != "NONE"))
189206 then throw("This certification have already been revoked.")
190207 else if ((entryExist == "NONE"))
191208 then throw("You cannot change the status of this certification.")
192209 else if ((callerIsWhiteListedNum > 0))
193- then [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]
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, toBytes(acceptedToken))]
194211 else if (!(callerIsDapp))
195212 then {
196213 let payment = value(invoke.payments[0])
197214 let amount = value(payment.amount)
198215 let paymentAssetId = if (isDefined(payment.assetId))
199216 then value(payment.assetId)
200217 else throw("Waves is not accepted as payment")
201218 let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
202- if ((acceptedToken != paymentAssetId))
219+ if ((toBytes(acceptedToken) != paymentAssetId))
203220 then throw("This token is not accepted at the moment")
204221 else if (if ((amount != currentPrice))
205222 then (0 >= callerIsWhiteListedNum)
206223 else false)
207224 then throw("The price is wrong")
208225 else [StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]
209226 }
210227 else throw("You are not allowed to do that")
211228 }
212229
213230
214231
215232 @Callable(invoke)
216233 func usdnSignCredits () = {
217234 let payment = value(invoke.payments[0])
218235 let callerAddress = toBase58String(invoke.caller.bytes)
219236 let tokenId = value(payment.assetId)
220237 let amount = value(payment.amount)
221238 let numberOfCredits = ((amount * 2) / 1000000)
222239 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
223240 if ((toBase58String(tokenId) != usdnID))
224241 then throw("Only USDN can be exchanged")
225242 else if (if (((amount % 1000000) != 0))
226243 then ((amount % 1000000) != 500000)
227244 else false)
228245 then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(amount), 6)) + ".") + takeRight(toString(amount), 6)))
229246 else [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits)), ScriptTransfer(addressFromStringValue(bank), amount, tokenId)]
247+ }
248+
249+
250+
251+@Callable(i)
252+func whitelistFreeCertifications (address,amount,addToCurrentAmount) = {
253+ let caller = toString(addressFromPublicKey(i.callerPublicKey))
254+ let id = toBase58String(i.transactionId)
255+ if (containsElement([chris], caller))
256+ then {
257+ let currentAmount = valueOrElse(getInteger(this, (address + "_free_txq")), 0)
258+ let newAmount = if (addToCurrentAmount)
259+ then (currentAmount + amount)
260+ else amount
261+[IntegerEntry((address + "_free_txs"), newAmount)]
262+ }
263+ else throw("You are not authorized to whitelist txs")
230264 }
231265
232266
233267 @Verifier(tx)
234268 func verifier () = match tx {
235269 case inv: InvokeScriptTransaction =>
236270 if (if (if (if ((inv.function == "fileCertification"))
237271 then (inv.dApp == this)
238272 else false)
239273 then (inv.fee == 500000)
240274 else false)
241275 then (inv.feeAssetId == unit)
242276 else false)
243277 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[4])))
244278 else if (if (if (if ((inv.function == "revokeCertification"))
245279 then (inv.dApp == this)
246280 else false)
247281 then (inv.fee == 500000)
248282 else false)
249283 then (inv.feeAssetId == unit)
250284 else false)
251285 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[1])))
252286 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
253287 case _ =>
254288 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
255289 }
256290

github/deemru/w8io/026f985 
44.52 ms