From ae384cd2ad715f342a1d29c0c54a2d08463c9ca4 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Tue, 1 Oct 2024 08:49:37 +0100 Subject: [PATCH] wire sender in the events sql (#2071) * wire sender in the events sql * wire sender in the events sql --- go/enclave/storage/enclavedb/events.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/enclave/storage/enclavedb/events.go b/go/enclave/storage/enclavedb/events.go index 65b36d002e..173dd75cde 100644 --- a/go/enclave/storage/enclavedb/events.go +++ b/go/enclave/storage/enclavedb/events.go @@ -22,6 +22,7 @@ const ( baseEventsJoin = "from event_log e " + "join receipt rec on e.receipt=rec.id" + " join tx on rec.tx=tx.id " + + " left join externally_owned_account eoatx on tx.sender_address=eoatx.id " + " join batch b on rec.batch=b.sequence " + "join event_type et on e.event_type=et.id " + " join contract c on et.contract=c.id " + @@ -310,11 +311,13 @@ func visibilityQuery(requestingAccount *gethcommon.Address) (string, []any) { " (et.topic1_can_view AND eoa1.address=?) " + " OR (et.topic2_can_view AND eoa2.address=?) " + " OR (et.topic3_can_view AND eoa3.address=?)" + + " OR (et.sender_can_view AND eoatx.address=?)" + " )" + ")" visibParams = append(visibParams, acc) visibParams = append(visibParams, acc) visibParams = append(visibParams, acc) + visibParams = append(visibParams, acc) visibQuery += ") " return visibQuery, visibParams