Skip to content

chain/ethereum: Use the log_index as the transaction_log_index #6042

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

Merged
merged 1 commit into from
May 29, 2025
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
11 changes: 7 additions & 4 deletions chain/ethereum/src/trigger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,13 @@ impl<'a> EthereumEventData<'a> {
}

pub fn transaction_log_index(&self) -> &U256 {
self.log
.transaction_log_index
.as_ref()
.unwrap_or(&U256_DEFAULT)
// We purposely use the `log_index` here. Geth does not support
// `transaction_log_index`, and subgraphs that use it only care that
// it identifies the log, the specific value is not important. Still
// this will change the output of subgraphs that use this field.
//
// This was initially changed in commit b95c6953
self.log.log_index.as_ref().unwrap_or(&U256_DEFAULT)
}

pub fn log_type(&self) -> &Option<String> {
Expand Down
Loading