Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wire sender in the events sql #2071

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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