-
Notifications
You must be signed in to change notification settings - Fork 9
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
Aggregate and expose EVM-related event payloads #628
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ import ( | |
func Test_DecodeReceipts(t *testing.T) { | ||
cdcEv, rec := createTestEvent(t, evmTxBinary) | ||
|
||
_, receipt, err := decodeTransactionEvent(cdcEv) | ||
_, receipt, _, err := decodeTransactionEvent(cdcEv) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider testing the new event payload. The test ignores the newly added event payload return value, which is a key part of the PR's objective to aggregate EVM event payloads. Consider adding assertions to verify the correctness of this payload. Here's a suggested improvement: - _, receipt, _, err := decodeTransactionEvent(cdcEv)
+ _, receipt, payload, err := decodeTransactionEvent(cdcEv)
require.NoError(t, err)
+ // Verify the event payload
+ assert.NotNil(t, payload, "event payload should not be nil")
+ // Add specific assertions for payload fields based on test event data
|
||
require.NoError(t, err) | ||
|
||
for i, l := range rec.Logs { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add nil check for txEventPayload.
Consider adding a nil check before dereferencing
txEventPayload
to prevent potential panic.📝 Committable suggestion