tx · CM784NS6BhEJjeU4fZ8Q4ERGe1vkCE6Sx4XdjqT3Pz2L 3Mx5YY4dJftNEBsc8x2bdoMbJxHkVgvi3VA: -0.02100000 Waves 2022.07.16 09:34 [2141940] smart account 3Mx5YY4dJftNEBsc8x2bdoMbJxHkVgvi3VA > SELF 0.00000000 Waves
{ "type": 13, "id": "CM784NS6BhEJjeU4fZ8Q4ERGe1vkCE6Sx4XdjqT3Pz2L", "fee": 2100000, "feeAssetId": null, "timestamp": 1657953301295, "version": 2, "chainId": 84, "sender": "3Mx5YY4dJftNEBsc8x2bdoMbJxHkVgvi3VA", "senderPublicKey": "9m1oT327uzEFLbwLdQUnedfUHxKkN8MqFSQuSQCbtkqz", "proofs": [ "5sbmLFvJb1sZLZGJDFKjtkxynDxmQuWRJ7BrEV3gRW6JuYbfECNJs1xFLKAXNX4WrvrEGoNrwQREJTe9p4mgyyjm" ], "script": "base64:BgIsCAISBwoFCAgICAgSBAoCCAgSBgoECAgICBIICgYICAgICAgSBQoDCAgIEgARAA9zdG9yYWdlVmVyaWZpZXIJAQV2YWx1ZQEJAKYIAQIjM04yczVSdGFIUEJlbkNzeDJFQ2NvRlJiWUh4M25vWmhYVzEABGJhbmsCIzNOMUU2dFhkZFJvVmFSZlE5ZFEzdmc1TGFXMmZzZDhIS3ViAA1hY2NlcHRlZFRva2VuASDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAGdXNkbklEAiwzS0ZYQkdHTENqQTVaMkR1VzREcTlmRERySGpKSlAxWkVrYW9halN6dUtzQwAUc3RvcmFnZUZlZU11bHRpcGxpZXIAAQEKY2hlY2tFbnRyeQIGcHJlZml4BHV1aWQEByRtYXRjaDAJAJ0IAgUEdGhpcwkArAICBQZwcmVmaXgFBHV1aWQDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgROT05FAQ9jaGVja0VudHJ5RW1haWwCBHV1aWQGZG9tYWluBAckbWF0Y2gwCQCdCAI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9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tled/bqR8=", "height": 2141940, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9m1S48B7DqMYEHFefk2sZ72fZb8XR8pwYPvqqcoRoPqF Next: 5QE3bSniZgDPCBghRpgztG5vJSp7Reas3MM8vt2XdZD8 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func isNFT (assetDetails) = if (if ((assetDetails.quantity == 1)) | |
5 | - | then (assetDetails.decimals == 0) | |
6 | - | else false) | |
7 | - | then (assetDetails.reissuable == false) | |
8 | - | else false | |
4 | + | let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
5 | + | ||
6 | + | let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
7 | + | ||
8 | + | let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
9 | + | ||
10 | + | let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC" | |
11 | + | ||
12 | + | let storageFeeMultiplier = 1 | |
13 | + | ||
14 | + | func checkEntry (prefix,uuid) = match getString(this, (prefix + uuid)) { | |
15 | + | case a: String => | |
16 | + | a | |
17 | + | case _ => | |
18 | + | "NONE" | |
19 | + | } | |
9 | 20 | ||
10 | 21 | ||
11 | - | @Callable(i) | |
12 | - | func burnNFTProxy () = if ((size(i.payments) == 0)) | |
13 | - | then throw("No payment attached") | |
14 | - | else { | |
15 | - | let payment = value(i.payments[0]) | |
16 | - | let amount = value(payment.amount) | |
17 | - | let assetDetails = value(assetInfo(value(payment.assetId))) | |
18 | - | if (!(isNFT(assetDetails))) | |
19 | - | then throw("this is not a NFT") | |
20 | - | else [Burn(value(payment.assetId), 1)] | |
21 | - | } | |
22 | + | func checkEntryEmail (uuid,domain) = match getString(this, ((uuid + "@") + domain)) { | |
23 | + | case a: String => | |
24 | + | a | |
25 | + | case _ => | |
26 | + | "NONE" | |
27 | + | } | |
22 | 28 | ||
29 | + | ||
30 | + | func checkUUID (uuid) = match getString(this, uuid) { | |
31 | + | case a: String => | |
32 | + | a | |
33 | + | case _ => | |
34 | + | "NONE" | |
35 | + | } | |
36 | + | ||
37 | + | ||
38 | + | func checkIfWhiteListed (callerAddress) = match getInteger(this, ("addr_WHITELISTED_" + callerAddress)) { | |
39 | + | case a: Int => | |
40 | + | a | |
41 | + | case _ => | |
42 | + | 0 | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | func isAdress (addr) = if (if (if ((size(addr) == 35)) | |
47 | + | then (take(addr, 2) == "3P") | |
48 | + | else false) | |
49 | + | then true | |
50 | + | else (take(addr, 2) == "3N")) | |
51 | + | then true | |
52 | + | else (take(addr, 2) == "3M") | |
53 | + | ||
54 | + | ||
55 | + | func countParties (accumulator,addr) = if ((size(addr) > 0)) | |
56 | + | then (accumulator + 1) | |
57 | + | else (accumulator + 0) | |
58 | + | ||
59 | + | ||
60 | + | func checkIfPendingToSign (key) = match getString(this, key) { | |
61 | + | case a: String => | |
62 | + | if ((a == "PENDING")) | |
63 | + | then true | |
64 | + | else false | |
65 | + | case _ => | |
66 | + | false | |
67 | + | } | |
68 | + | ||
69 | + | ||
70 | + | func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\""))) | |
71 | + | ||
72 | + | ||
73 | + | func getValue (json,key) = { | |
74 | + | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
75 | + | let data = drop(json, ((keyIndex + size(key)) + 3)) | |
76 | + | let jsonValue = getValueString(data) | |
77 | + | jsonValue | |
78 | + | } | |
79 | + | ||
80 | + | ||
81 | + | func getJsonBeforeValue (json,key) = { | |
82 | + | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
83 | + | let data = take(json, ((keyIndex + size(key)) + 3)) | |
84 | + | data | |
85 | + | } | |
86 | + | ||
87 | + | ||
88 | + | func getJsonAfterValue (json,key) = { | |
89 | + | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
90 | + | let data = takeRight(json, (size(json) - ((((keyIndex + size(key)) + 3) + 0) + 2))) | |
91 | + | data | |
92 | + | } | |
93 | + | ||
94 | + | ||
95 | + | func asString (bv) = match bv { | |
96 | + | case bv0: String => | |
97 | + | bv0 | |
98 | + | case _ => | |
99 | + | throw("Sponsored Public Key String expected") | |
100 | + | } | |
101 | + | ||
102 | + | ||
103 | + | @Callable(invoke) | |
104 | + | func fileCertification (hash,title,uuid,ipfs,signerPubKey) = { | |
105 | + | let id = value(invoke.transactionId) | |
106 | + | let entryExist = checkEntry(hash, uuid) | |
107 | + | let uuidExist = checkUUID(uuid) | |
108 | + | let callerIsDapp = (this == invoke.caller) | |
109 | + | let callerAddress = if (callerIsDapp) | |
110 | + | then toString(addressFromPublicKey(fromBase58String(signerPubKey))) | |
111 | + | else toBase58String(invoke.caller.bytes) | |
112 | + | let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress) | |
113 | + | if ((entryExist != "NONE")) | |
114 | + | then throw("This entry already exist") | |
115 | + | else if ((uuidExist != "NONE")) | |
116 | + | then throw("This uuid already exist") | |
117 | + | else if ((size(uuid) != 36)) | |
118 | + | then throw("Uuid should be 36 characters.") | |
119 | + | else if ((size(hash) != 64)) | |
120 | + | then throw("Hash should be 64 characters.") | |
121 | + | else if ((size(title) > 100)) | |
122 | + | then throw("Title is too long, 100 characters max.") | |
123 | + | else if (if (if (contains(hash, "\"")) | |
124 | + | then true | |
125 | + | else contains(title, "\"")) | |
126 | + | then true | |
127 | + | else contains(ipfs, "\"")) | |
128 | + | then throw("No \" allowed") | |
129 | + | else { | |
130 | + | let data = (((((((("{\"hash\":\"" + hash) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"title\":\"") + title) + "\",\"ipfs\":\"") + ipfs) + "\"}") | |
131 | + | if ((callerIsWhiteListedNum > 0)) | |
132 | + | then { | |
133 | + | let creditCost = if ((size(ipfs) != 0)) | |
134 | + | then (1 + storageFeeMultiplier) | |
135 | + | else 1 | |
136 | + | if ((0 > (callerIsWhiteListedNum - creditCost))) | |
137 | + | then throw("Not enough credit") | |
138 | + | 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)] | |
139 | + | } | |
140 | + | else if (!(callerIsDapp)) | |
141 | + | then { | |
142 | + | let payment = value(invoke.payments[0]) | |
143 | + | let amount = value(payment.amount) | |
144 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
145 | + | then value(payment.assetId) | |
146 | + | else throw("Waves is not accepted as payment") | |
147 | + | let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
148 | + | let feeCost = if ((size(ipfs) != 0)) | |
149 | + | then (currentPrice + (storageFeeMultiplier * currentPrice)) | |
150 | + | else currentPrice | |
151 | + | if ((acceptedToken != paymentAssetId)) | |
152 | + | then throw("This token is not accepted at the moment") | |
153 | + | else if (if ((amount != feeCost)) | |
154 | + | then (0 >= callerIsWhiteListedNum) | |
155 | + | else false) | |
156 | + | then throw("The price is wrong") | |
157 | + | 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)] | |
158 | + | } | |
159 | + | else throw("You are not allowed to do that") | |
160 | + | } | |
161 | + | } | |
162 | + | ||
163 | + | ||
164 | + | ||
165 | + | @Callable(invoke) | |
166 | + | func revokeCertification (certificationId,signerPubKey) = { | |
167 | + | let id = value(invoke.transactionId) | |
168 | + | let callerIsDapp = (this == invoke.caller) | |
169 | + | let callerAddress = if (callerIsDapp) | |
170 | + | then toString(addressFromPublicKey(fromBase58String(signerPubKey))) | |
171 | + | else toBase58String(invoke.caller.bytes) | |
172 | + | let entryExist = match getString(this, ((("data_fc_" + certificationId) + "_") + callerAddress)) { | |
173 | + | case a: String => | |
174 | + | a | |
175 | + | case _ => | |
176 | + | "NONE" | |
177 | + | } | |
178 | + | let isRevoked = match getString(this, ("STATUS_FC_" + certificationId)) { | |
179 | + | case a: String => | |
180 | + | a | |
181 | + | case _ => | |
182 | + | "NONE" | |
183 | + | } | |
184 | + | let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress) | |
185 | + | let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}") | |
186 | + | if ((isRevoked != "NONE")) | |
187 | + | then throw("This certification have already been revoked.") | |
188 | + | else if ((entryExist == "NONE")) | |
189 | + | then throw("You cannot change the status of this certification.") | |
190 | + | else if ((callerIsWhiteListedNum > 0)) | |
191 | + | 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)] | |
192 | + | else if (!(callerIsDapp)) | |
193 | + | then { | |
194 | + | let payment = value(invoke.payments[0]) | |
195 | + | let amount = value(payment.amount) | |
196 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
197 | + | then value(payment.assetId) | |
198 | + | else throw("Waves is not accepted as payment") | |
199 | + | let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
200 | + | if ((acceptedToken != paymentAssetId)) | |
201 | + | then throw("This token is not accepted at the moment") | |
202 | + | else if (if ((amount != currentPrice)) | |
203 | + | then (0 >= callerIsWhiteListedNum) | |
204 | + | else false) | |
205 | + | then throw("The price is wrong") | |
206 | + | else [StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)] | |
207 | + | } | |
208 | + | else throw("You are not allowed to do that") | |
209 | + | } | |
210 | + | ||
211 | + | ||
212 | + | ||
213 | + | @Callable(invoke) | |
214 | + | func emailCertification (domain,title,uuid,signerPubKey) = { | |
215 | + | let id = value(invoke.transactionId) | |
216 | + | let entryExist = checkEntryEmail(domain, uuid) | |
217 | + | let uuidExist = checkUUID(uuid) | |
218 | + | let callerIsDapp = (this == invoke.caller) | |
219 | + | let callerAddress = if (callerIsDapp) | |
220 | + | then toString(addressFromPublicKey(fromBase58String(signerPubKey))) | |
221 | + | else toBase58String(invoke.caller.bytes) | |
222 | + | let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress) | |
223 | + | if ((entryExist != "NONE")) | |
224 | + | then throw("This entry already exist") | |
225 | + | else if ((uuidExist != "NONE")) | |
226 | + | then throw("This uuid already exist") | |
227 | + | else if ((size(uuid) > 36)) | |
228 | + | then throw("Uuid is too long, 36 characters max.") | |
229 | + | else if ((size(domain) > 150)) | |
230 | + | then throw("Domain is too long, 150 characters max.") | |
231 | + | else if ((size(title) > 100)) | |
232 | + | then throw("Title is too long, 100 characters max.") | |
233 | + | else if (if (if (contains(uuid, "\"")) | |
234 | + | then true | |
235 | + | else contains(title, "\"")) | |
236 | + | then true | |
237 | + | else contains(domain, "\"")) | |
238 | + | then throw("No \" allowed") | |
239 | + | else { | |
240 | + | let data = (((((((("{\"messageid\":\"" + uuid) + "@") + domain) + "\",\"timestamp\":") + toString(lastBlock.timestamp)) + ",\"reference\":\"") + title) + "\"}") | |
241 | + | if ((callerIsWhiteListedNum > 0)) | |
242 | + | then [StringEntry(uuid, toBase58String(id)), StringEntry(((uuid + "@") + domain), toBase58String(id)), StringEntry((title + uuid), toBase58String(id)), IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(((("data_ec_" + toBase58String(id)) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)] | |
243 | + | else if (!(callerIsDapp)) | |
244 | + | then { | |
245 | + | let payment = value(invoke.payments[0]) | |
246 | + | let amount = value(payment.amount) | |
247 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
248 | + | then value(payment.assetId) | |
249 | + | else throw("Waves is not accepted as payment") | |
250 | + | let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
251 | + | if ((acceptedToken != paymentAssetId)) | |
252 | + | then throw("This token is not accepted at the moment") | |
253 | + | else if (if ((amount != currentPrice)) | |
254 | + | then (0 >= callerIsWhiteListedNum) | |
255 | + | else false) | |
256 | + | then throw("The price is wrong") | |
257 | + | else [StringEntry(uuid, toBase58String(id)), StringEntry(((uuid + "@") + domain), toBase58String(id)), StringEntry((title + uuid), toBase58String(id)), StringEntry(((("data_ec_" + toBase58String(id)) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)] | |
258 | + | } | |
259 | + | else throw("You are not allowed to do that") | |
260 | + | } | |
261 | + | } | |
262 | + | ||
263 | + | ||
264 | + | ||
265 | + | @Callable(invoke) | |
266 | + | func createAgreement (hash,title,stringifiedJSON,counterParts,signerPubKey,uuid) = { | |
267 | + | let id = value(invoke.transactionId) | |
268 | + | let entryExist = checkEntry(hash, uuid) | |
269 | + | let uuidExist = checkUUID(uuid) | |
270 | + | let callerIsDapp = (this == invoke.caller) | |
271 | + | let callerAddress = if (callerIsDapp) | |
272 | + | then toString(addressFromPublicKey(fromBase58String(signerPubKey))) | |
273 | + | else toBase58String(invoke.caller.bytes) | |
274 | + | let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress) | |
275 | + | let JSON = ((((getJsonBeforeValue(stringifiedJSON, "creator") + "\"") + callerAddress) + "\"") + getJsonAfterValue(stringifiedJSON, "creator")) | |
276 | + | let addressesArray = split(counterParts, ",") | |
277 | + | let totalAddresses = size(addressesArray) | |
278 | + | let globalDataTitle = StringEntry((title + uuid), toBase58String(id)) | |
279 | + | let globalDataHash = StringEntry((hash + uuid), toBase58String(id)) | |
280 | + | let globalDataJson = StringEntry(((("data_MA_" + toBase58String(id)) + "_") + callerAddress), JSON) | |
281 | + | let globalDataOwner = StringEntry(((callerAddress + "_MA_") + toBase58String(id)), ("SIGNED_" + toBase58String(id))) | |
282 | + | let dataWhiteListed = IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - (totalAddresses + 1))) | |
283 | + | if ((entryExist != "NONE")) | |
284 | + | then throw("This entry already exist") | |
285 | + | else if ((uuidExist != "NONE")) | |
286 | + | then throw("This uuid already exist") | |
287 | + | else if ((size(uuid) > 36)) | |
288 | + | then throw("Uuid is too long, 36 characters max.") | |
289 | + | else if ((size(hash) > 64)) | |
290 | + | then throw("Message-id is too long, 64 characters max.") | |
291 | + | else if ((size(title) > 100)) | |
292 | + | then throw("Title is too long, 100 characters max.") | |
293 | + | else if ((callerIsWhiteListedNum > 0)) | |
294 | + | then if (((totalAddresses + 1) > callerIsWhiteListedNum)) | |
295 | + | then throw("You don't have enough certification credit") | |
296 | + | else if ((totalAddresses == 6)) | |
297 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[5] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[4]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[5]), 0, acceptedToken)] | |
298 | + | else if ((totalAddresses == 5)) | |
299 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[4]), 0, acceptedToken)] | |
300 | + | else if ((totalAddresses == 4)) | |
301 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken)] | |
302 | + | else if ((totalAddresses == 3)) | |
303 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)] | |
304 | + | else if ((totalAddresses == 2)) | |
305 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)] | |
306 | + | else if ((totalAddresses == 1)) | |
307 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)] | |
308 | + | else throw("Wrong number of participants") | |
309 | + | else if (!(callerIsDapp)) | |
310 | + | then { | |
311 | + | let payment = value(invoke.payments[0]) | |
312 | + | let amount = if (isDefined(payment.amount)) | |
313 | + | then value(payment.amount) | |
314 | + | else 0 | |
315 | + | let paymentAssetId = if (isDefined(payment.assetId)) | |
316 | + | then value(payment.assetId) | |
317 | + | else acceptedToken | |
318 | + | let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId)))) | |
319 | + | if (((currentPrice * (totalAddresses + 1)) > amount)) | |
320 | + | then throw(("The price is wrong, it should be " + toString((currentPrice * (totalAddresses + 1))))) | |
321 | + | else if ((totalAddresses == 6)) | |
322 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[5] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[4]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[5]), 0, acceptedToken)] | |
323 | + | else if ((totalAddresses == 5)) | |
324 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[4]), 0, acceptedToken)] | |
325 | + | else if ((totalAddresses == 4)) | |
326 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken)] | |
327 | + | else if ((totalAddresses == 3)) | |
328 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)] | |
329 | + | else if ((totalAddresses == 2)) | |
330 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)] | |
331 | + | else if ((totalAddresses == 1)) | |
332 | + | then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)] | |
333 | + | else throw(("Needs 1 to 6 recipient addresses, currently sent: " + toString(totalAddresses))) | |
334 | + | } | |
335 | + | else throw("You are not allowed to do that") | |
336 | + | } | |
337 | + | ||
338 | + | ||
339 | + | ||
340 | + | @Callable(invoke) | |
341 | + | func signAgreement (hash,agreementId,signerPubKey) = { | |
342 | + | let payment = value(invoke.payments[0]) | |
343 | + | let amount = value(payment.amount) | |
344 | + | let id = value(invoke.transactionId) | |
345 | + | let callerIsDapp = (this == invoke.caller) | |
346 | + | let signer = if (callerIsDapp) | |
347 | + | then toString(addressFromPublicKey(fromBase58String(signerPubKey))) | |
348 | + | else toBase58String(invoke.caller.bytes) | |
349 | + | let signingRequestExist = checkIfPendingToSign(((signer + "_MA_") + agreementId)) | |
350 | + | if (!(signingRequestExist)) | |
351 | + | then throw("Sorry there is no pending signature") | |
352 | + | else [StringEntry(((signer + "_MA_") + agreementId), ("SIGNED_" + toBase58String(id))), ScriptTransfer(addressFromStringValue(signer), 0, acceptedToken)] | |
353 | + | } | |
354 | + | ||
355 | + | ||
356 | + | ||
357 | + | @Callable(invoke) | |
358 | + | func usdnSignCredits () = { | |
359 | + | let payment = value(invoke.payments[0]) | |
360 | + | let callerAddress = toBase58String(invoke.caller.bytes) | |
361 | + | let tokenId = value(payment.assetId) | |
362 | + | let amount = value(payment.amount) | |
363 | + | let numberOfCredits = ((amount * 2) / 1000000) | |
364 | + | let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress) | |
365 | + | if ((toBase58String(tokenId) != usdnID)) | |
366 | + | then throw("Only USDN can be exchanged") | |
367 | + | else if (if (((amount % 1000000) != 0)) | |
368 | + | then ((amount % 1000000) != 500000) | |
369 | + | else false) | |
370 | + | then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(amount), 6)) + ".") + takeRight(toString(amount), 6))) | |
371 | + | else [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits)), ScriptTransfer(addressFromStringValue(bank), amount, tokenId)] | |
372 | + | } | |
373 | + | ||
374 | + | ||
375 | + | @Verifier(tx) | |
376 | + | func verifier () = match tx { | |
377 | + | case inv: InvokeScriptTransaction => | |
378 | + | if (if ((inv.function == "fileCertification")) | |
379 | + | then true | |
380 | + | else (inv.function == "createAgreement")) | |
381 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[4]))) | |
382 | + | else if ((inv.function == "emailCertification")) | |
383 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[3]))) | |
384 | + | else if ((inv.function == "signAgreement")) | |
385 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[2]))) | |
386 | + | else if ((inv.function == "revokeCertification")) | |
387 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[1]))) | |
388 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
389 | + | case _ => | |
390 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
391 | + | } | |
23 | 392 |
github/deemru/w8io/026f985 65.32 ms ◑