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