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

Update make transformations logs and contextualizations #407

Conversation

ponyjackal
Copy link
Contributor

No description provided.

@ponyjackal ponyjackal requested a review from pcowgill July 26, 2024 16:49

if (transaction.receipt?.logs) {
return transaction.receipt.logs.map((log) => {
return {
Copy link
Contributor

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?

Copy link
Contributor

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);
Copy link
Contributor

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?

Copy link
Contributor

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
Copy link
Contributor

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

@pcowgill pcowgill merged commit 66b0d3f into main Jul 31, 2024
2 checks passed
@pcowgill pcowgill deleted the feature/ou-2726-update-make-transformations-logs-and-contextualizations branch July 31, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants