Skip to content

Commit

Permalink
wire sender in the events sql (#2071)
Browse files Browse the repository at this point in the history
* wire sender in the events sql

* wire sender in the events sql
  • Loading branch information
tudor-malene authored Oct 1, 2024
1 parent 8cf3b01 commit ae384cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/enclave/storage/enclavedb/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 " +
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ae384cd

Please sign in to comment.