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