tx · CEsFRg2DNNvvsXTxmcs4BnPuH2yqHukWn6yX7Ha4vLGz

3N3un747n1iL9Q2RqjHvSdXYhukyk18hURa:  -0.01400000 Waves

2020.04.23 11:35 [966882] smart account 3N3un747n1iL9Q2RqjHvSdXYhukyk18hURa > SELF 0.00000000 Waves

{ "type": 13, "id": "CEsFRg2DNNvvsXTxmcs4BnPuH2yqHukWn6yX7Ha4vLGz", "fee": 1400000, "feeAssetId": null, "timestamp": 1587630919966, "version": 1, "sender": "3N3un747n1iL9Q2RqjHvSdXYhukyk18hURa", "senderPublicKey": "3DM68yZjTGD3N7jbU9yxXH1kmdPfNaaU9eq1D4YbncUb", "proofs": [ "5QDbZS5NJJTUMqfaE5jb1uxxzE5Rss5rCpWzTMMZZkSzE8pJ2Ud1gBp4iGDPe9gm96PRsc6yVBVfKCjeorHePzRT" ], "script": "base64:AAIDAAAAAAAAABMIARIECgIICBIJCgcBCAEICAEBAAAAAAAAAAIAAAABaQEAAAALdXBkYXRlSW5mb3MAAAACAAAABG5hbWUAAAAFaW50cm8EAAAADG93bmVyQWRkcmVzcwgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQUAAAAMb3duZXJBZGRyZXNzAgAAAAVfbmFtZQUAAAAEbmFtZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEFAAAADG93bmVyQWRkcmVzcwIAAAAGX2ludHJvBQAAAAVpbnRybwUAAAADbmlsAAAAAWkBAAAADWFkZFVwZGF0ZUNhc2UAAAAHAAAAC2lkZW50aWZpYW50AAAABmdlbmRlcgAAAANhZ2UAAAAIbG9jYXRpb24AAAADZXhwAAAABnN0YXR1cwAAAARkYXRlBAAAAAxvd25lckFkZHJlc3MJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBAAAABFjdXJyZW50Q291bnRlck51bQQAAAAHJ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aWVudF8JAAGkAAAAAQUAAAAJcGF0aWVudElEAgAAAAdfc3RhdHVzBQAAAAZzdGF0dXMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAFX2RhdGUFAAAABGRhdGUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAFX2pzb24FAAAABGpzb24JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAtfY291bnRlck51bQUAAAANdXBkYXRlQ291bnRlcgUAAAADbmlsAAAAAP7I7eA=", "chainId": 84, "height": 966882, "spentComplexity": 0 } View: original | compacted Prev: ByX271n5dZj5bKoPS5hZFRjwp6bPQsgFKMz31JN5Q93M Next: none Diff:
OldNewDifferences
1212
1313
1414 @Callable(i)
15-func addUpdateCase (identifiant,gender,age,location,pec,status,date) = {
15+func addUpdateCase (identifiant,gender,age,location,exp,status,date) = {
1616 let ownerAddress = toString(i.caller)
1717 let currentCounterNum = match getInteger(this, (ownerAddress + "_counterNum")) {
1818 case c: Int =>
2626 case _ =>
2727 (currentCounterNum + 1)
2828 }
29- let json = (((((((((((((("{\"identifiant\":\"" + toString(patientID)) + "\",\"gender\":\"") + gender) + "\",\"age\":\"") + toString(age)) + "\",\"pec\":\"") + pec) + "\",\"location\":\"") + location) + "\",\"date\":\"") + toString(date)) + "\",\"status\":\"") + toString(status)) + "\"}")
29+ let json = (((((((((((((("{\"identifiant\":\"" + toString(patientID)) + "\",\"gender\":\"") + gender) + "\",\"age\":\"") + toString(age)) + "\",\"exp\":\"") + exp) + "\",\"location\":\"") + location) + "\",\"date\":\"") + toString(date)) + "\",\"status\":\"") + toString(status)) + "\"}")
3030 let updateCounter = if ((identifiant == 0))
3131 then (currentCounterNum + 1)
3232 else currentCounterNum
33- if (if (if ((status != 1))
33+ if (if ((status != 1))
3434 then (status != 2)
3535 else false)
36- then (status != 3)
37- else false)
3836 then throw("Wrong status")
39- 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)])
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)) + "_exp"), exp), 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)])
4038 }
4139
4240
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func updateInfos (name,intro) = {
88 let ownerAddress = i.caller
99 WriteSet([DataEntry((toString(ownerAddress) + "_name"), name), DataEntry((toString(ownerAddress) + "_intro"), intro)])
1010 }
1111
1212
1313
1414 @Callable(i)
15-func addUpdateCase (identifiant,gender,age,location,pec,status,date) = {
15+func addUpdateCase (identifiant,gender,age,location,exp,status,date) = {
1616 let ownerAddress = toString(i.caller)
1717 let currentCounterNum = match getInteger(this, (ownerAddress + "_counterNum")) {
1818 case c: Int =>
1919 c
2020 case _ =>
2121 0
2222 }
2323 let patientID = match getInteger(this, (((ownerAddress + "_patient_") + toString(identifiant)) + "_identifiant")) {
2424 case p: Int =>
2525 p
2626 case _ =>
2727 (currentCounterNum + 1)
2828 }
29- let json = (((((((((((((("{\"identifiant\":\"" + toString(patientID)) + "\",\"gender\":\"") + gender) + "\",\"age\":\"") + toString(age)) + "\",\"pec\":\"") + pec) + "\",\"location\":\"") + location) + "\",\"date\":\"") + toString(date)) + "\",\"status\":\"") + toString(status)) + "\"}")
29+ let json = (((((((((((((("{\"identifiant\":\"" + toString(patientID)) + "\",\"gender\":\"") + gender) + "\",\"age\":\"") + toString(age)) + "\",\"exp\":\"") + exp) + "\",\"location\":\"") + location) + "\",\"date\":\"") + toString(date)) + "\",\"status\":\"") + toString(status)) + "\"}")
3030 let updateCounter = if ((identifiant == 0))
3131 then (currentCounterNum + 1)
3232 else currentCounterNum
33- if (if (if ((status != 1))
33+ if (if ((status != 1))
3434 then (status != 2)
3535 else false)
36- then (status != 3)
37- else false)
3836 then throw("Wrong status")
39- 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)])
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)) + "_exp"), exp), 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)])
4038 }
4139
4240

github/deemru/w8io/873ac7e 
51.28 ms