tx · 3cv5ACqABZjS1tdFYEYMSJ5SKhF8v4YG7LxbUnRfby17 3N5qnwhXtjrJtpZLuZQa98okoMX2fucgfUf: -0.01400000 Waves 2020.07.15 17:14 [1088549] smart account 3N5qnwhXtjrJtpZLuZQa98okoMX2fucgfUf > SELF 0.00000000 Waves
{ "type": 13, "id": "3cv5ACqABZjS1tdFYEYMSJ5SKhF8v4YG7LxbUnRfby17", "fee": 1400000, "feeAssetId": null, "timestamp": 1594822559695, "version": 1, "sender": "3N5qnwhXtjrJtpZLuZQa98okoMX2fucgfUf", "senderPublicKey": "ExsKkJLFkMnDXSPq87dAdCwEB8ZTkD3LVRtvoH9m13Qv", "proofs": [ "3ZQF4ULDDHKQdwg7XVvqCpxigZHPrvSaoUCqq1e3dFuXW5Znur4fwjfpzLrdJMZiw6oaVi1NiN9hUApRnkB7W4b6" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAADZm9vAAAAAAkBAAAACFdyaXRlU2V0AAAAAQUAAAADbmlsAAAAACvwfcA=", "chainId": 84, "height": 1088549, "spentComplexity": 0 } View: original | compacted Prev: e4PfkjdLfUYfXoSJjP5hBTCDQqufPhd62bsGfqPfzoK Next: 25Gdu9u1qqFKv29t173UHKaUgutrgkigSg79GXvpMcLK Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 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 | - | } | |
7 | + | func foo () = WriteSet(nil) | |
11 | 8 | ||
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 | - | 0 | |
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 (if ((status != 1)) | |
34 | - | then (status != 2) | |
35 | - | else false) | |
36 | - | then (status != 3) | |
37 | - | else false) | |
38 | - | 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)]) | |
40 | - | } | |
41 | - | ||
42 | - | ||
43 | - | @Verifier(tx) | |
44 | - | func standardVerifier () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
45 | 9 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 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 | - | } | |
7 | + | func foo () = WriteSet(nil) | |
11 | 8 | ||
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 | - | 0 | |
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 (if ((status != 1)) | |
34 | - | then (status != 2) | |
35 | - | else false) | |
36 | - | then (status != 3) | |
37 | - | else false) | |
38 | - | 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)]) | |
40 | - | } | |
41 | - | ||
42 | - | ||
43 | - | @Verifier(tx) | |
44 | - | func standardVerifier () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
45 | 9 |
github/deemru/w8io/169f3d6 26.76 ms ◑