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