tx · DNhuT46cAmoninkLo7NkcbM8HB87icUoDLyKTyz4RLRT

3N48Q743PKQTUd2PzrWopm3duBnTmV2drNC:  -0.01400000 Waves

2020.04.23 10:48 [966835] smart account 3N48Q743PKQTUd2PzrWopm3duBnTmV2drNC > SELF 0.00000000 Waves

{ "type": 13, "id": "DNhuT46cAmoninkLo7NkcbM8HB87icUoDLyKTyz4RLRT", "fee": 1400000, "feeAssetId": null, "timestamp": 1587628097135, "version": 1, "sender": "3N48Q743PKQTUd2PzrWopm3duBnTmV2drNC", "senderPublicKey": "DtgcuFeJCEpayJZvfYkM9WMxVLR2secZksKefiFpsT5k", "proofs": [ "aGWQ8q2dEf1d4LiRU4Tq8JQ8akL1HxKMA2ocL5j9PdPc2EG54DqkB3x75K1v3n5XGiUVd1MMxhuM6QnPZYRAvrj" ], "script": "base64:AAIDAAAAAAAAABMIARIECgIICBIJCgcBCAEICAEBAAAAAAAAAAIAAAABaQEAAAALdXBkYXRlSW5mb3MAAAACAAAABG5hbWUAAAAFaW50cm8EAAAADG93bmVyQWRkcmVzcwgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQUAAAAMb3duZXJBZGRyZXNzAgAAAAVfbmFtZQUAAAAEbmFtZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEFAAAADG93bmVyQWRkcmVzcwIAAAAGX2ludHJvBQAAAAVpbnRybwUAAAADbmlsAAAAAWkBAAAADWFkZFVwZGF0ZUNhc2UAAAAHAAAAC2lkZW50aWZpYW50AAAABmdlbmRlcgAAAANhZ2UAAAAIbG9jYXRpb24AAAADcGVjAAAABnN0YXR1cwAAAARkYXRlBAAAAAxvd25lckFkZHJlc3MJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBAAAABFjdXJyZW50Q291bnRlck51bQQAAAAHJG1hdGNoMAkABBo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AAAAAQUAAAAJcGF0aWVudElEAgAAAAdfc3RhdHVzBQAAAAZzdGF0dXMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAFX2RhdGUFAAAABGRhdGUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAFX2pzb24FAAAABGpzb24JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAtfY291bnRlck51bQUAAAANdXBkYXRlQ291bnRlcgUAAAADbmlsAAAAAE1dbSM=", "chainId": 84, "height": 966835, "spentComplexity": 0 } View: original | compacted Prev: none Next: 3UKHk4SkBBp3ck3pw1i8kf7WzUTkv5i6JbMoQq5jNTpZ Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+
5+
6+@Callable(i)
7+func updateInfos (name,intro) = {
8+ let ownerAddress = i.caller
9+ WriteSet([DataEntry((toString(ownerAddress) + "_name"), name), DataEntry((toString(ownerAddress) + "_intro"), intro)])
10+ }
11+
12+
13+
14+@Callable(i)
15+func addUpdateCase (identifiant,gender,age,location,pec,status,date) = {
16+ let ownerAddress = toString(i.caller)
17+ let currentCounterNum = match getInteger(this, (ownerAddress + "_counterNum")) {
18+ case c: Int =>
19+ c
20+ case _ =>
21+ 1
22+ }
23+ let patientID = match getInteger(this, (((ownerAddress + "_patient_") + toString(identifiant)) + "_identifiant")) {
24+ case p: Int =>
25+ p
26+ case _ =>
27+ (currentCounterNum + 1)
28+ }
29+ let json = (((((((((((((("{\"identifiant\":\"" + toString(patientID)) + "\",\"gender\":\"") + gender) + "\",\"age\":\"") + toString(age)) + "\",\"pec\":\"") + pec) + "\",\"location\":\"") + location) + "\",\"date\":\"") + toString(date)) + "\",\"status\":\"") + toString(status)) + "\"}")
30+ let updateCounter = if ((identifiant == 0))
31+ then (currentCounterNum + 1)
32+ else currentCounterNum
33+ if (if ((status != 1))
34+ then (status != 2)
35+ else false)
36+ then throw("Wrong status")
37+ else WriteSet([DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_identifiant"), patientID), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_gender"), gender), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_age"), age), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_pec"), pec), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_location"), location), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_status"), status), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_date"), date), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_json"), json), DataEntry((ownerAddress + "_counterNum"), updateCounter)])
38+ }
39+
40+

github/deemru/w8io/026f985 
17.13 ms