tx · EgnLTvTXXb26voa7PBwQhiqrwehzkrVLYDfZuKSTG8RK

3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB:  -0.01400000 Waves

2021.01.18 05:55 [1358289] smart account 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB > SELF 0.00000000 Waves

{ "type": 13, "id": "EgnLTvTXXb26voa7PBwQhiqrwehzkrVLYDfZuKSTG8RK", "fee": 1400000, "feeAssetId": null, "timestamp": 1610938599129, "version": 2, "chainId": 84, "sender": "3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB", "senderPublicKey": "Gd5NihbWQoWuTnSvq25TuV2BYZG4U1e9KDqZn9zBPix7", "proofs": [ "4vySP84kJQvAbA4jBT1x4zKd4DkpUHcMMhQ8tovSXpfqp2hvFVy6nUA2iSQFjRNm7AyiL5wJFKpv46doU1gDwjJu" ], "script": "base64:AAIDAAAAAAAAAC0IARIHCgUICAgICBIECgIICBIHCgUICAgICBIICgYICAgICAgSBQoDCAgIEgAAAAAQAAAAAA9zdG9yYWdlVmVyaWZpZXIJAQAAAAdleHRyYWN0AAAAAQkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM04yczVSdGFIUEJlbkNzeDJFQ2NvRlJiWUh4M25vWmhYVzEAAAAABGJhbmsCAAAAIzNOMUU2dFhkZFJvVmFSZlE5ZFEzdmc1TGFXMmZzZDhIS3ViAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAGdXNkbklEAgAAACwzS0ZYQkdHTENqQTVaMkR1VzREcTlmRERySGpKSlAxWkVrYW9halN6dUtzQwEAAAAKY2hlY2tFbnRyeQAAAAIAAAAGcHJlZml4AAAABHV1aWQEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAZwcmVmaXgFAAAABHV1aWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQA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AAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQkBAAAACGFzU3RyaW5nAAAAAQkAAZEAAAACCAUAAAADaW52AAAABGFyZ3MAAAAAAAAAAAIDCQAAAAAAAAIIBQAAAANpbnYAAAAIZnVuY3Rpb24CAAAAE3Jldm9rZUNlcnRpZmljYXRpb24JAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEJAQAAAAhhc1N0cmluZwAAAAEJAAGRAAAAAggFAAAAA2ludgAAAARhcmdzAAAAAAAAAAABCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk8R6Wx", "height": 1358289, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5fv6tuMjjGxjfDTF2LARXBpkDFP5cgj244KqF6o4yAKi Next: FdYDozj552AqNm3WaY2ypPnbC1TXBioXnSNLsuyxRHVq Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
4+let storageVerifier = extract(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
55
6-let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
6+let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
77
88 let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
99
3939 case _ =>
4040 0
4141 }
42+
43+
44+func isAdress (addr) = if (if (if ((size(addr) == 35))
45+ then (take(addr, 2) == "3P")
46+ else false)
47+ then true
48+ else (take(addr, 2) == "3N"))
49+ then true
50+ else (take(addr, 2) == "3M")
51+
52+
53+func countParties (accumulator,addr) = if ((size(addr) > 0))
54+ then (accumulator + 1)
55+ else (accumulator + 0)
4256
4357
4458 func checkIfPendingToSign (key) = match getString(this, key) {
86100
87101 @Callable(invoke)
88102 func fileCertification (hash,title,uuid,data,signerPubKey) = {
89- let id = toBase58String(invoke.transactionId)
103+ let id = extract(invoke.transactionId)
90104 let entryExist = checkEntry(hash, uuid)
91105 let uuidExist = checkUUID(uuid)
92106 let callerIsDapp = (this == invoke.caller)
99113 else if ((uuidExist != "NONE"))
100114 then throw("This uuid already exist")
101115 else if ((size(uuid) != 36))
102- then throw("Uuid v1 should be 36 characters.")
116+ then throw("Uuid should be 36 characters.")
103117 else if ((size(hash) != 64))
104- then throw("Sha 256 hjash should be 64 characters.")
118+ then throw("Hash should be 64 characters.")
105119 else if ((size(title) > 64))
106120 then throw("Title is too long, 64 characters max.")
107121 else if ((callerIsWhiteListedNum > 0))
108- then [StringEntry(uuid, id), StringEntry((hash + uuid), id), StringEntry((title + uuid), id), IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(((("data_fc_" + id) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]
122+ then ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry((hash + uuid), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), DataEntry(((("data_fc_" + toBase58String(id)) + "_") + callerAddress), data)]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]))
109123 else if (!(callerIsDapp))
110124 then {
111- let payment = value(invoke.payments[0])
112- let amount = payment.amount
125+ let payment = extract(invoke.payment)
126+ let amount = extract(payment.amount)
113127 let paymentAssetId = if (isDefined(payment.assetId))
114- then payment.assetId
128+ then extract(payment.assetId)
115129 else throw("Waves is not accepted as payment")
116- let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
130+ let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
117131 if ((acceptedToken != paymentAssetId))
118132 then throw("This token is not accepted at the moment")
119133 else if (if ((amount != currentPrice))
120134 then (0 >= callerIsWhiteListedNum)
121135 else false)
122136 then throw("The price is wrong")
123- else [StringEntry(uuid, id), StringEntry((hash + uuid), id), StringEntry((title + uuid), id), StringEntry(((("data_fc_" + id) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(feeReceiver), amount, payment.assetId)]
137+ else ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry((hash + uuid), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(((("data_fc_" + toBase58String(id)) + "_") + callerAddress), data)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
124138 }
125139 else throw("You are not allowed to do that")
126140 }
129143
130144 @Callable(invoke)
131145 func revokeCertification (certificationId,signerPubKey) = {
132- let id = toBase58String(invoke.transactionId)
146+ let id = extract(invoke.transactionId)
133147 let callerIsDapp = (this == invoke.caller)
134148 let callerAddress = if (callerIsDapp)
135149 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
152166 else if ((entryExist == "NONE"))
153167 then throw("You cannot change the status of this certification.")
154168 else {
155- let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + id) + "\"}")
169+ let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}")
156170 if ((callerIsWhiteListedNum > 0))
157- then [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + id)), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson)]
171+ then WriteSet([DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), DataEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), DataEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson)])
158172 else if (!(callerIsDapp))
159173 then {
160- let payment = value(invoke.payments[0])
161- let amount = payment.amount
174+ let payment = extract(invoke.payment)
175+ let amount = extract(payment.amount)
162176 let paymentAssetId = if (isDefined(payment.assetId))
163- then payment.assetId
177+ then extract(payment.assetId)
164178 else throw("Waves is not accepted as payment")
165- let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
179+ let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
166180 if ((acceptedToken != paymentAssetId))
167181 then throw("This token is not accepted at the moment")
168182 else if (if ((amount != currentPrice))
169183 then (0 >= callerIsWhiteListedNum)
170184 else false)
171185 then throw("The price is wrong")
172- else [StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + id)), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(feeReceiver), amount, payment.assetId)]
186+ else ScriptResult(WriteSet([DataEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), DataEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
173187 }
174188 else throw("You are not allowed to do that")
175189 }
178192
179193
180194 @Callable(invoke)
181-func emailCertification (domain,uuid,data,title,signerPubKey) = {
182- let id = toBase58String(invoke.transactionId)
195+func emailCertification (domain,title,uuid,data,signerPubKey) = {
196+ let id = extract(invoke.transactionId)
183197 let entryExist = checkEntryEmail(domain, uuid)
184198 let uuidExist = checkUUID(uuid)
185199 let callerIsDapp = (this == invoke.caller)
198212 else if ((size(title) > 64))
199213 then throw("Title is too long, 64 characters max.")
200214 else if ((callerIsWhiteListedNum > 0))
201- then [StringEntry(uuid, id), StringEntry(((uuid + "@") + domain), id), StringEntry((title + uuid), id), IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(((("data_ec_" + id) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]
215+ then ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry(((uuid + "@") + domain), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), DataEntry(((("data_ec_" + toBase58String(id)) + "_") + callerAddress), data)]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]))
202216 else if (!(callerIsDapp))
203217 then {
204- let payment = value(invoke.payments[0])
205- let amount = payment.amount
218+ let payment = extract(invoke.payment)
219+ let amount = extract(payment.amount)
206220 let paymentAssetId = if (isDefined(payment.assetId))
207- then payment.assetId
221+ then extract(payment.assetId)
208222 else throw("Waves is not accepted as payment")
209- let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
223+ let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
210224 if ((acceptedToken != paymentAssetId))
211225 then throw("This token is not accepted at the moment")
212226 else if (if ((amount != currentPrice))
213227 then (0 >= callerIsWhiteListedNum)
214228 else false)
215229 then throw("The price is wrong")
216- else [StringEntry(uuid, id), StringEntry(((uuid + "@") + domain), id), StringEntry((title + uuid), id), StringEntry(((("data_ec_" + id) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(feeReceiver), amount, payment.assetId)]
230+ else ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry(((uuid + "@") + domain), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(((("data_ec_" + toBase58String(id)) + "_") + callerAddress), data)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
217231 }
218232 else throw("You are not allowed to do that")
219233 }
222236
223237 @Callable(invoke)
224238 func createAgreement (hash,title,stringifiedJSON,counterParts,signerPubKey,uuid) = {
225- let id = toBase58String(invoke.transactionId)
239+ let id = extract(invoke.transactionId)
226240 let entryExist = checkEntry(hash, uuid)
227241 let uuidExist = checkUUID(uuid)
228242 let callerIsDapp = (this == invoke.caller)
233247 let JSON = ((((getJsonBeforeValue(stringifiedJSON, "creator") + "\"") + callerAddress) + "\"") + getJsonAfterValue(stringifiedJSON, "creator"))
234248 let addressesArray = split(counterParts, ",")
235249 let totalAddresses = size(addressesArray)
236- let globalDataTitle = StringEntry((title + uuid), id)
237- let globalDataHash = StringEntry((hash + uuid), id)
238- let globalDataJson = StringEntry(((("data_MA_" + id) + "_") + callerAddress), JSON)
239- let globalDataOwner = StringEntry(((callerAddress + "_MA_") + id), ("SIGNED_" + id))
240- let dataWhiteListed = IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - (totalAddresses + 1)))
250+ let globalDataTitle = DataEntry((title + uuid), toBase58String(id))
251+ let globalDataHash = DataEntry((hash + uuid), toBase58String(id))
252+ let globalDataJson = DataEntry(((("data_MA_" + toBase58String(id)) + "_") + callerAddress), JSON)
253+ let globalDataOwner = DataEntry(((callerAddress + "_MA_") + toBase58String(id)), ("SIGNED_" + toBase58String(id)))
254+ let dataWhiteListed = DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - (totalAddresses + 1)))
241255 if ((entryExist != "NONE"))
242256 then throw("This entry already exist")
243257 else if ((uuidExist != "NONE"))
244258 then throw("This uuid already exist")
245- else if ((size(uuid) != 36))
246- then throw("Uuid v1 should be 36 characters.")
247- else if ((size(hash) != 64))
248- then throw("Sha 256 hash should be 64 characters.")
259+ else if ((size(uuid) > 36))
260+ then throw("Uuid is too long, 36 characters max.")
261+ else if ((size(hash) > 64))
262+ then throw("Message-id is too long, 64 characters max.")
249263 else if ((size(title) > 64))
250264 then throw("Title is too long, 64 characters max.")
251265 else if ((callerIsWhiteListedNum > 0))
252266 then if (((totalAddresses + 1) > callerIsWhiteListedNum))
253267 then throw("You don't have enough certification credit")
254268 else if ((totalAddresses == 6))
255- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[5] + "_MA_") + 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)]
269+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[5] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
256270 else if ((totalAddresses == 5))
257- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + 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)]
271+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
258272 else if ((totalAddresses == 4))
259- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + 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)]
273+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
260274 else if ((totalAddresses == 3))
261- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + 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)]
275+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)]))
262276 else if ((totalAddresses == 2))
263- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]
277+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]))
264278 else if ((totalAddresses == 1))
265- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)]
279+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)]))
266280 else throw("Wrong number of participants")
267281 else if (!(callerIsDapp))
268282 then {
269- let payment = value(invoke.payments[0])
283+ let payment = extract(invoke.payment)
270284 let amount = if (isDefined(payment.amount))
271- then payment.amount
285+ then extract(payment.amount)
272286 else 0
273287 let paymentAssetId = if (isDefined(payment.assetId))
274- then payment.assetId
288+ then extract(payment.assetId)
275289 else acceptedToken
276- let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
290+ let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
277291 if (((currentPrice * (totalAddresses + 1)) > amount))
278292 then throw(("The price is wrong, it should be " + toString((currentPrice * (totalAddresses + 1)))))
279293 else if ((totalAddresses == 6))
280- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[5] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), 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)]
294+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[5] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
281295 else if ((totalAddresses == 5))
282- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), 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)]
296+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
283297 else if ((totalAddresses == 4))
284- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), 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)]
298+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
285299 else if ((totalAddresses == 3))
286- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)]
300+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)]))
287301 else if ((totalAddresses == 2))
288- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]
302+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]))
289303 else if ((totalAddresses == 1))
290- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)]
304+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)]))
291305 else throw(("Needs 1 to 6 recipient addresses, currently sent: " + toString(totalAddresses)))
292306 }
293307 else throw("You are not allowed to do that")
297311
298312 @Callable(invoke)
299313 func signAgreement (hash,agreementId,signerPubKey) = {
300- let payment = value(invoke.payments[0])
301- let amount = payment.amount
302- let id = toBase58String(invoke.transactionId)
314+ let payment = extract(invoke.payment)
315+ let amount = extract(payment.amount)
316+ let id = extract(invoke.transactionId)
303317 let callerIsDapp = (this == invoke.caller)
304318 let signer = if (callerIsDapp)
305319 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
307321 let signingRequestExist = checkIfPendingToSign(((signer + "_MA_") + agreementId))
308322 if (!(signingRequestExist))
309323 then throw("Sorry there is no pending signature")
310- else [StringEntry(((signer + "_MA_") + agreementId), ("SIGNED_" + id)), ScriptTransfer(addressFromStringValue(signer), 0, acceptedToken)]
324+ else ScriptResult(WriteSet([DataEntry(((signer + "_MA_") + agreementId), ("SIGNED_" + toBase58String(id)))]), TransferSet([ScriptTransfer(addressFromStringValue(signer), 0, acceptedToken)]))
311325 }
312326
313327
314328
315329 @Callable(invoke)
316330 func usdnSignCredits () = {
317- let payment = value(invoke.payments[0])
331+ let payment = extract(invoke.payment)
318332 let callerAddress = toBase58String(invoke.caller.bytes)
319- let tokenId = payment.assetId
320- let amount = payment.amount
333+ let tokenId = extract(payment.assetId)
334+ let amount = extract(payment.amount)
321335 let numberOfCredits = ((amount * 2) / 1000000)
322336 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
323- if ((toBase58String(value(tokenId)) != usdnID))
337+ if ((toBase58String(tokenId) != usdnID))
324338 then throw("Only USDN can be exchanged")
325339 else if (if (((amount % 1000000) != 0))
326340 then ((amount % 1000000) != 500000)
327341 else false)
328342 then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(amount), 6)) + ".") + takeRight(toString(amount), 6)))
329- else [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits)), ScriptTransfer(addressFromStringValue(feeReceiver), amount, tokenId)]
343+ else ScriptResult(WriteSet([DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits))]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, tokenId)]))
330344 }
331345
332346
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let storageVerifier = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
4+let storageVerifier = extract(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
55
6-let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
6+let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
77
88 let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
99
1010 let usdnID = "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"
1111
1212 func checkEntry (prefix,uuid) = match getString(this, (prefix + uuid)) {
1313 case a: String =>
1414 a
1515 case _ =>
1616 "NONE"
1717 }
1818
1919
2020 func checkEntryEmail (uuid,domain) = match getString(this, ((uuid + "@") + domain)) {
2121 case a: String =>
2222 a
2323 case _ =>
2424 "NONE"
2525 }
2626
2727
2828 func checkUUID (uuid) = match getString(this, uuid) {
2929 case a: String =>
3030 a
3131 case _ =>
3232 "NONE"
3333 }
3434
3535
3636 func checkIfWhiteListed (callerAddress) = match getInteger(this, ("addr_WHITELISTED_" + callerAddress)) {
3737 case a: Int =>
3838 a
3939 case _ =>
4040 0
4141 }
42+
43+
44+func isAdress (addr) = if (if (if ((size(addr) == 35))
45+ then (take(addr, 2) == "3P")
46+ else false)
47+ then true
48+ else (take(addr, 2) == "3N"))
49+ then true
50+ else (take(addr, 2) == "3M")
51+
52+
53+func countParties (accumulator,addr) = if ((size(addr) > 0))
54+ then (accumulator + 1)
55+ else (accumulator + 0)
4256
4357
4458 func checkIfPendingToSign (key) = match getString(this, key) {
4559 case a: String =>
4660 if ((a == "PENDING"))
4761 then true
4862 else false
4963 case _ =>
5064 false
5165 }
5266
5367
5468 func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\"")))
5569
5670
5771 func getValue (json,key) = {
5872 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
5973 let data = drop(json, ((keyIndex + size(key)) + 3))
6074 let jsonValue = getValueString(data)
6175 jsonValue
6276 }
6377
6478
6579 func getJsonBeforeValue (json,key) = {
6680 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
6781 let data = take(json, ((keyIndex + size(key)) + 3))
6882 data
6983 }
7084
7185
7286 func getJsonAfterValue (json,key) = {
7387 let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
7488 let data = takeRight(json, (size(json) - ((((keyIndex + size(key)) + 3) + 0) + 2)))
7589 data
7690 }
7791
7892
7993 func asString (bv) = match bv {
8094 case bv0: String =>
8195 bv0
8296 case _ =>
8397 throw("Sponsored Public Key String expected")
8498 }
8599
86100
87101 @Callable(invoke)
88102 func fileCertification (hash,title,uuid,data,signerPubKey) = {
89- let id = toBase58String(invoke.transactionId)
103+ let id = extract(invoke.transactionId)
90104 let entryExist = checkEntry(hash, uuid)
91105 let uuidExist = checkUUID(uuid)
92106 let callerIsDapp = (this == invoke.caller)
93107 let callerAddress = if (callerIsDapp)
94108 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
95109 else toBase58String(invoke.caller.bytes)
96110 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
97111 if ((entryExist != "NONE"))
98112 then throw("This entry already exist")
99113 else if ((uuidExist != "NONE"))
100114 then throw("This uuid already exist")
101115 else if ((size(uuid) != 36))
102- then throw("Uuid v1 should be 36 characters.")
116+ then throw("Uuid should be 36 characters.")
103117 else if ((size(hash) != 64))
104- then throw("Sha 256 hjash should be 64 characters.")
118+ then throw("Hash should be 64 characters.")
105119 else if ((size(title) > 64))
106120 then throw("Title is too long, 64 characters max.")
107121 else if ((callerIsWhiteListedNum > 0))
108- then [StringEntry(uuid, id), StringEntry((hash + uuid), id), StringEntry((title + uuid), id), IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(((("data_fc_" + id) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]
122+ then ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry((hash + uuid), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), DataEntry(((("data_fc_" + toBase58String(id)) + "_") + callerAddress), data)]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]))
109123 else if (!(callerIsDapp))
110124 then {
111- let payment = value(invoke.payments[0])
112- let amount = payment.amount
125+ let payment = extract(invoke.payment)
126+ let amount = extract(payment.amount)
113127 let paymentAssetId = if (isDefined(payment.assetId))
114- then payment.assetId
128+ then extract(payment.assetId)
115129 else throw("Waves is not accepted as payment")
116- let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
130+ let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
117131 if ((acceptedToken != paymentAssetId))
118132 then throw("This token is not accepted at the moment")
119133 else if (if ((amount != currentPrice))
120134 then (0 >= callerIsWhiteListedNum)
121135 else false)
122136 then throw("The price is wrong")
123- else [StringEntry(uuid, id), StringEntry((hash + uuid), id), StringEntry((title + uuid), id), StringEntry(((("data_fc_" + id) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(feeReceiver), amount, payment.assetId)]
137+ else ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry((hash + uuid), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(((("data_fc_" + toBase58String(id)) + "_") + callerAddress), data)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
124138 }
125139 else throw("You are not allowed to do that")
126140 }
127141
128142
129143
130144 @Callable(invoke)
131145 func revokeCertification (certificationId,signerPubKey) = {
132- let id = toBase58String(invoke.transactionId)
146+ let id = extract(invoke.transactionId)
133147 let callerIsDapp = (this == invoke.caller)
134148 let callerAddress = if (callerIsDapp)
135149 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
136150 else toBase58String(invoke.caller.bytes)
137151 let entryExist = match getString(this, ((("data_fc_" + certificationId) + "_") + callerAddress)) {
138152 case a: String =>
139153 a
140154 case _ =>
141155 "NONE"
142156 }
143157 let isRevoked = match getString(this, ("STATUS_FC_" + certificationId)) {
144158 case a: String =>
145159 a
146160 case _ =>
147161 "NONE"
148162 }
149163 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
150164 if ((isRevoked != "NONE"))
151165 then throw("This certification have already been revoked.")
152166 else if ((entryExist == "NONE"))
153167 then throw("You cannot change the status of this certification.")
154168 else {
155- let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + id) + "\"}")
169+ let newJson = (((dropRight(entryExist, 1) + ",\"status\":\"REVOKED_") + toBase58String(id)) + "\"}")
156170 if ((callerIsWhiteListedNum > 0))
157- then [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + id)), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson)]
171+ then WriteSet([DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), DataEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), DataEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson)])
158172 else if (!(callerIsDapp))
159173 then {
160- let payment = value(invoke.payments[0])
161- let amount = payment.amount
174+ let payment = extract(invoke.payment)
175+ let amount = extract(payment.amount)
162176 let paymentAssetId = if (isDefined(payment.assetId))
163- then payment.assetId
177+ then extract(payment.assetId)
164178 else throw("Waves is not accepted as payment")
165- let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
179+ let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
166180 if ((acceptedToken != paymentAssetId))
167181 then throw("This token is not accepted at the moment")
168182 else if (if ((amount != currentPrice))
169183 then (0 >= callerIsWhiteListedNum)
170184 else false)
171185 then throw("The price is wrong")
172- else [StringEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + id)), StringEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson), ScriptTransfer(addressFromStringValue(feeReceiver), amount, payment.assetId)]
186+ else ScriptResult(WriteSet([DataEntry(("STATUS_FC_" + certificationId), ("REVOKED_" + toBase58String(id))), DataEntry(((("data_fc_" + certificationId) + "_") + callerAddress), newJson)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
173187 }
174188 else throw("You are not allowed to do that")
175189 }
176190 }
177191
178192
179193
180194 @Callable(invoke)
181-func emailCertification (domain,uuid,data,title,signerPubKey) = {
182- let id = toBase58String(invoke.transactionId)
195+func emailCertification (domain,title,uuid,data,signerPubKey) = {
196+ let id = extract(invoke.transactionId)
183197 let entryExist = checkEntryEmail(domain, uuid)
184198 let uuidExist = checkUUID(uuid)
185199 let callerIsDapp = (this == invoke.caller)
186200 let callerAddress = if (callerIsDapp)
187201 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
188202 else toBase58String(invoke.caller.bytes)
189203 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
190204 if ((entryExist != "NONE"))
191205 then throw("This entry already exist")
192206 else if ((uuidExist != "NONE"))
193207 then throw("This uuid already exist")
194208 else if ((size(uuid) > 36))
195209 then throw("Uuid is too long, 36 characters max.")
196210 else if ((size(domain) > 64))
197211 then throw("Domain is too long, 64 characters max.")
198212 else if ((size(title) > 64))
199213 then throw("Title is too long, 64 characters max.")
200214 else if ((callerIsWhiteListedNum > 0))
201- then [StringEntry(uuid, id), StringEntry(((uuid + "@") + domain), id), StringEntry((title + uuid), id), IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), StringEntry(((("data_ec_" + id) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]
215+ then ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry(((uuid + "@") + domain), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - 1)), DataEntry(((("data_ec_" + toBase58String(id)) + "_") + callerAddress), data)]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken)]))
202216 else if (!(callerIsDapp))
203217 then {
204- let payment = value(invoke.payments[0])
205- let amount = payment.amount
218+ let payment = extract(invoke.payment)
219+ let amount = extract(payment.amount)
206220 let paymentAssetId = if (isDefined(payment.assetId))
207- then payment.assetId
221+ then extract(payment.assetId)
208222 else throw("Waves is not accepted as payment")
209- let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
223+ let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
210224 if ((acceptedToken != paymentAssetId))
211225 then throw("This token is not accepted at the moment")
212226 else if (if ((amount != currentPrice))
213227 then (0 >= callerIsWhiteListedNum)
214228 else false)
215229 then throw("The price is wrong")
216- else [StringEntry(uuid, id), StringEntry(((uuid + "@") + domain), id), StringEntry((title + uuid), id), StringEntry(((("data_ec_" + id) + "_") + callerAddress), data), ScriptTransfer(addressFromStringValue(feeReceiver), amount, payment.assetId)]
230+ else ScriptResult(WriteSet([DataEntry(uuid, toBase58String(id)), DataEntry(((uuid + "@") + domain), toBase58String(id)), DataEntry((title + uuid), toBase58String(id)), DataEntry(((("data_ec_" + toBase58String(id)) + "_") + callerAddress), data)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, payment.assetId)]))
217231 }
218232 else throw("You are not allowed to do that")
219233 }
220234
221235
222236
223237 @Callable(invoke)
224238 func createAgreement (hash,title,stringifiedJSON,counterParts,signerPubKey,uuid) = {
225- let id = toBase58String(invoke.transactionId)
239+ let id = extract(invoke.transactionId)
226240 let entryExist = checkEntry(hash, uuid)
227241 let uuidExist = checkUUID(uuid)
228242 let callerIsDapp = (this == invoke.caller)
229243 let callerAddress = if (callerIsDapp)
230244 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
231245 else toBase58String(invoke.caller.bytes)
232246 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
233247 let JSON = ((((getJsonBeforeValue(stringifiedJSON, "creator") + "\"") + callerAddress) + "\"") + getJsonAfterValue(stringifiedJSON, "creator"))
234248 let addressesArray = split(counterParts, ",")
235249 let totalAddresses = size(addressesArray)
236- let globalDataTitle = StringEntry((title + uuid), id)
237- let globalDataHash = StringEntry((hash + uuid), id)
238- let globalDataJson = StringEntry(((("data_MA_" + id) + "_") + callerAddress), JSON)
239- let globalDataOwner = StringEntry(((callerAddress + "_MA_") + id), ("SIGNED_" + id))
240- let dataWhiteListed = IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - (totalAddresses + 1)))
250+ let globalDataTitle = DataEntry((title + uuid), toBase58String(id))
251+ let globalDataHash = DataEntry((hash + uuid), toBase58String(id))
252+ let globalDataJson = DataEntry(((("data_MA_" + toBase58String(id)) + "_") + callerAddress), JSON)
253+ let globalDataOwner = DataEntry(((callerAddress + "_MA_") + toBase58String(id)), ("SIGNED_" + toBase58String(id)))
254+ let dataWhiteListed = DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum - (totalAddresses + 1)))
241255 if ((entryExist != "NONE"))
242256 then throw("This entry already exist")
243257 else if ((uuidExist != "NONE"))
244258 then throw("This uuid already exist")
245- else if ((size(uuid) != 36))
246- then throw("Uuid v1 should be 36 characters.")
247- else if ((size(hash) != 64))
248- then throw("Sha 256 hash should be 64 characters.")
259+ else if ((size(uuid) > 36))
260+ then throw("Uuid is too long, 36 characters max.")
261+ else if ((size(hash) > 64))
262+ then throw("Message-id is too long, 64 characters max.")
249263 else if ((size(title) > 64))
250264 then throw("Title is too long, 64 characters max.")
251265 else if ((callerIsWhiteListedNum > 0))
252266 then if (((totalAddresses + 1) > callerIsWhiteListedNum))
253267 then throw("You don't have enough certification credit")
254268 else if ((totalAddresses == 6))
255- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[5] + "_MA_") + 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)]
269+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[5] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
256270 else if ((totalAddresses == 5))
257- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + 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)]
271+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
258272 else if ((totalAddresses == 4))
259- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + 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)]
273+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
260274 else if ((totalAddresses == 3))
261- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + 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)]
275+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)]))
262276 else if ((totalAddresses == 2))
263- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]
277+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]))
264278 else if ((totalAddresses == 1))
265- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)]
279+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, dataWhiteListed, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(callerAddress), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)]))
266280 else throw("Wrong number of participants")
267281 else if (!(callerIsDapp))
268282 then {
269- let payment = value(invoke.payments[0])
283+ let payment = extract(invoke.payment)
270284 let amount = if (isDefined(payment.amount))
271- then payment.amount
285+ then extract(payment.amount)
272286 else 0
273287 let paymentAssetId = if (isDefined(payment.assetId))
274- then payment.assetId
288+ then extract(payment.assetId)
275289 else acceptedToken
276- let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(value(paymentAssetId))))
290+ let currentPrice = getIntegerValue(storageVerifier, ("certification_fee_" + toBase58String(extract(paymentAssetId))))
277291 if (((currentPrice * (totalAddresses + 1)) > amount))
278292 then throw(("The price is wrong, it should be " + toString((currentPrice * (totalAddresses + 1)))))
279293 else if ((totalAddresses == 6))
280- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[5] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), 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)]
294+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[5] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
281295 else if ((totalAddresses == 5))
282- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[4] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), 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)]
296+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
283297 else if ((totalAddresses == 4))
284- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[3] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), 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)]
298+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([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)]))
285299 else if ((totalAddresses == 3))
286- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[2] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)]
300+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)]))
287301 else if ((totalAddresses == 2))
288- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), StringEntry(((addressesArray[1] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]
302+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)]))
289303 else if ((totalAddresses == 1))
290- then [globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, StringEntry(((addressesArray[0] + "_MA_") + id), "PENDING"), ScriptTransfer(addressFromStringValue(feeReceiver), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)]
304+ then ScriptResult(WriteSet([globalDataTitle, globalDataHash, globalDataJson, globalDataOwner, DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken)]))
291305 else throw(("Needs 1 to 6 recipient addresses, currently sent: " + toString(totalAddresses)))
292306 }
293307 else throw("You are not allowed to do that")
294308 }
295309
296310
297311
298312 @Callable(invoke)
299313 func signAgreement (hash,agreementId,signerPubKey) = {
300- let payment = value(invoke.payments[0])
301- let amount = payment.amount
302- let id = toBase58String(invoke.transactionId)
314+ let payment = extract(invoke.payment)
315+ let amount = extract(payment.amount)
316+ let id = extract(invoke.transactionId)
303317 let callerIsDapp = (this == invoke.caller)
304318 let signer = if (callerIsDapp)
305319 then toString(addressFromPublicKey(fromBase58String(signerPubKey)))
306320 else toBase58String(invoke.caller.bytes)
307321 let signingRequestExist = checkIfPendingToSign(((signer + "_MA_") + agreementId))
308322 if (!(signingRequestExist))
309323 then throw("Sorry there is no pending signature")
310- else [StringEntry(((signer + "_MA_") + agreementId), ("SIGNED_" + id)), ScriptTransfer(addressFromStringValue(signer), 0, acceptedToken)]
324+ else ScriptResult(WriteSet([DataEntry(((signer + "_MA_") + agreementId), ("SIGNED_" + toBase58String(id)))]), TransferSet([ScriptTransfer(addressFromStringValue(signer), 0, acceptedToken)]))
311325 }
312326
313327
314328
315329 @Callable(invoke)
316330 func usdnSignCredits () = {
317- let payment = value(invoke.payments[0])
331+ let payment = extract(invoke.payment)
318332 let callerAddress = toBase58String(invoke.caller.bytes)
319- let tokenId = payment.assetId
320- let amount = payment.amount
333+ let tokenId = extract(payment.assetId)
334+ let amount = extract(payment.amount)
321335 let numberOfCredits = ((amount * 2) / 1000000)
322336 let callerIsWhiteListedNum = checkIfWhiteListed(callerAddress)
323- if ((toBase58String(value(tokenId)) != usdnID))
337+ if ((toBase58String(tokenId) != usdnID))
324338 then throw("Only USDN can be exchanged")
325339 else if (if (((amount % 1000000) != 0))
326340 then ((amount % 1000000) != 500000)
327341 else false)
328342 then throw(((("You can only exchange multiple of 0.5, you sent:" + dropRight(toString(amount), 6)) + ".") + takeRight(toString(amount), 6)))
329- else [IntegerEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits)), ScriptTransfer(addressFromStringValue(feeReceiver), amount, tokenId)]
343+ else ScriptResult(WriteSet([DataEntry(("addr_WHITELISTED_" + callerAddress), (callerIsWhiteListedNum + numberOfCredits))]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, tokenId)]))
330344 }
331345
332346
333347 @Verifier(tx)
334348 func verifier () = match tx {
335349 case inv: InvokeScriptTransaction =>
336350 if (if (if ((inv.function == "fileCertification"))
337351 then true
338352 else (inv.function == "emailCertification"))
339353 then true
340354 else (inv.function == "createAgreement"))
341355 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[4])))
342356 else if ((inv.function == "signAgreement"))
343357 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[2])))
344358 else if ((inv.function == "revokeCertification"))
345359 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(asString(inv.args[1])))
346360 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
347361 case _ =>
348362 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
349363 }
350364

github/deemru/w8io/026f985 
188.15 ms