-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update make transformations logs and contextualizations #407
Update make transformations logs and contextualizations #407
Conversation
|
||
if (transaction.receipt?.logs) { | ||
return transaction.receipt.logs.map((log) => { | ||
return { |
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.
@ponyjackal I think we may need to add chainId too. Do any contextualizations depend on that?
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.
If so, we can circle back to that in a follow-up PR
@@ -28,7 +28,7 @@ export function detect(transaction: Transaction): boolean { | |||
* and it also serves to decouple the logic, thereby simplifying the testing process | |||
*/ | |||
const originChainId = transaction.chainId ?? 1; | |||
const logs = transaction.logs ?? []; | |||
const logs = grabLogsFromTransaction(transaction); |
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.
@ponyjackal I worry that future contributors may not remember to use this helper when writing new contextualizations. This isn't blocking feedback for this PR, but can we make this change somewhere upstream, to ensure that it works even if people use transaction.logs without the helper?
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.
I created a Linear issue to track this as a separate task
@@ -48,6 +48,10 @@ import ensBulkRenew0x25add712 from './test/transactions/ensBulkRenew-0x25add712. | |||
import skyoneerPlotAction0x9436b659 from './test/transactions/skyoneerPlotAction-0x9436b659.json'; | |||
import skyoneerPlotAction0x9bb5a737 from './test/transactions/skyoneerPlotAction-0x9bb5a737.json'; | |||
import skyoneerPlotAction0x496c6309 from './test/transactions/skyoneerPlotAction-0x496c6309.json'; | |||
// untransformed transactions |
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.
Nice, thanks for adding this
…logs-and-contextualizations
No description provided.